There are \(26\) letters in the English alphabet and 6 of them are vowels: a,e,i,o,u,y
.
Other \(20\) letters are called consonants.
Limak is a little polar bear.
He found a string s consisting of lowercase English letters.
He is going to read and pronounce s but it may be hard for him.
Some letters are harder to pronounce, some are easier.
Generally, little polar bears like vowels (letters a,e,i,o,u,y
) and hate consonants.
Your task is to check whether pronouncing s will be hard or easy. We define s to be hard if at least one of the two conditions holds true:
- There are more consonants than vowels.
- Some 3 consecutive letters are all consonants.
For each test case in one line print "hard"
(without the quotes) if s is hard to pronounce.
Otherwise, print "easy"
(without the quotes).
Input format
The first line of the input contains one integer T denoting the number of test cases.
The first line of each test case description contains one string s denoting a string found by Limak. Each character in s is one of \(26\) lowercase English letters.
Output format
For each test case, output a single line containing the answer — either "hard"
or "easy"
.
Constraints
- \(1 \le T \le 50\)
- \(1 \le |s| \le 50\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial