Timer is Running

Message decoding
Submissions: 798   Accuracy:


  Difficulty: Basic   Marks: 1

James and Lilly are best friends. James has his personal mobile phone but Lilly has lost her mobile phone recently. So to chat with James she uses her cousins mobile phones. So, whenever Lilly sends a message to James, she encode "hello" to some other words w. James knows that it is Lilly's message if he is able to get  "hello" from word w by deleting some letters from it. Help James to decode the words quickly so that he can get more time to chat with her.

Note : Words can have both uppercase and lowercase letters.


The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains one line contains the word w, which James receives in his mobile phone.

Output :
For each test case in a new line print print "1" if it is Lilly's message , otherwise print "0".

Constraints :

Complexity : O(n)

Example :
Input :

Output :

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun
Author: arun03

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.