Problem Author: Sanket Bailmare
Drake loves to compose songs. This time he decides to compose in the language and grammar of his own. He decides to construct the words dictionary which would help him to compose his song. This time when he decides to something different, he tries to impress Kiki with the lines having some pattern. He shows T cases having N words each to Kiki to impress her. She gets impressed when she sees that each word is starting with a letter same as the ending letter of preceding word.
You have to tell whether Kiki is Impressed with Drake or not.
The first line of input contain an integer T denoting the number of test cases.
Each test case consists number of words N followed by space separated N words(small case) on the next line.
For each test case, output a single line “impressed” if the condition is satisfied.
And “disappointed” if condition is not satisfied.
abcd defg qhij oklm
mcqz zqed defg
abcd klmn dejk
In test case 1 words “abcd” & “defg” satisfy the criteria but the remaining words do not satisfy hence kiki is disappointed with these words.
In test case 2 words are arranged in the order where the condition is satisfied hence kiki is impressed.
In test case 3 words can be arranged in order to meet the condition hence kiki is impressed.