@@ -0,0 +1,936 @@
+import java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.util.ArrayDeque;%0Aimport java.util.Queue;%0A%0Apublic class ChatRoom %7B%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A        String s = reader.readLine();%0A        Queue%3CCharacter%3E checkedSymbols = new ArrayDeque%3C%3E();%0A        checkedSymbols.add('h');%0A        checkedSymbols.add('e');%0A        checkedSymbols.add('l');%0A        checkedSymbols.add('l');%0A        checkedSymbols.add('o');%0A        for (int i = 0; i %3C s.length(); i++) %7B%0A            char cur = s.charAt(i);%0A            if (cur == checkedSymbols.peek()) %7B%0A                checkedSymbols.remove();%0A                if (checkedSymbols.isEmpty()) %7B%0A                    System.out.println(%22YES%22);%0A                    return;%0A                %7D%0A            %7D%0A        %7D%0A        System.out.println(%22NO%22);%0A    %7D%0A%7D%0A

Add chatroom