ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

NEERC 2011, Eastern subregional contest

About     Problems     Submit solution     Judge status     Standings
Contest is over

E. Airport Announcements

Time limit: 1.0 second
Memory limit: 64 MB
Igor was bored of waiting in an airport lounge. Oceanic Airlines, a company he didn't like so much, delayed the departure of his flight, so he was late for the connection flight to Petrozavodsk, where a programming camp was to be held. Now he had to wait for long 300 minutes at the airport. Soon he heard a public announcement. Maybe, his flight had been canceled or, maybe, there were discounts on burgers at a nearby bar—Igor couldn't tell for sure. It seemed that the announcement had been repeated in several languages, but, strangely, there hadn't been Russian among them.
Igor recognized the language of some of the phrases he had heard. He assumed that the number of phrases in the announcement had been the same regardless of the language and that the announcement had been made at most once in each language. Help Igor to find the number of languages in which the announcement was made.

Input

The first line contains the total number n of phrases Igor heard (2 ≤ n ≤ 1 000). In the ith of the following n lines you are given the language of the ith phrase or the word “unknown” if Igor couldn't recognize the language. It is guaranteed that Igor could recognize the language of at least one of the phrases. The name of a language is a string of a length from four to twenty symbols consisting of lowercase English letters.

Output

Output the number of languages in which the announcement was made. If there are several answers, list them in ascending order. If there is no solution, output the string “Igor is wrong.”

Samples

inputoutput
6
english
unknown
unknown
unknown
german
unknown
2 3 6
4
english
french
unknown
english
Igor is wrong.
3
zulu
zulu
zulu
1
Problem Author: Denis Dublennykh
Problem Source: NEERC 2011, Eastern subregional contest
To submit the solution for this problem go to the Problem set: 1889. Airport Announcements