ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1102. Strange Dialog

Time limit: 1.0 second
Memory limit: 16 MB
One entity named "one" tells with his friend "puton" and their conversation is interesting. "One" can say words "out" and "output", besides he calls his friend by name. "Puton" can say words "in", "input" and "one". They understand each other perfect and even write dialogue in strings without spaces.
You have N strings. Find which of them are dialogues.

Input

In the first line of input there an integer N (1 ≤ N ≤ 1000). Next N lines contain non-empty strings. Each string consists of small Latin letters. The length of each string is no more than 4 · 106 characters, total length of all strings is no more than 8 · 106 characters.

Output

Output consists of N lines. Line contains word "YES", if string is some dialogue of "one" and "puton", otherwise "NO".

Sample

inputoutput
6
puton
inonputin
oneputonininputoutoutput
oneininputwooutoutput
outpu
utput
YES
NO
YES
NO
NO
NO
Problem Author: Katya Ovechkina
Problem Source: Tetrahedron Team Contest May 2001