COMPSEM1 - NEMO
Kaushik is fond of movies and recently saw an old one called "Finding nemo". He is also interested in programming so thinks how he can relate both.
He comes up with a problem for which you have to find the solution.
Given an input string dertermine if nemo can be a subsequence of it.
Note: For the uninformed, A subsequence of a string is a new string which is formed from the original string by deleting some of the characters without disturbing the relative positions of the remaining characters. For example, "AGH" is a subsequence of "ABCDEFGH" while "AHG" is not.
The first line contains an integer T which denotes the total number of test cases. Each test case contains a string containing lowercase letters only (a-z) of length no more than 100 characters.
For each test case print "YES" if the input string contains "nemo" as a subsequence otherwise print "NO".