Hide

Problem I
Pea Soup and Pancakes

/problems/peasoup/file/statement/en/img-0001.jpg
As a Swede, you hold a deep love for the traditional Thursday lunch of pea soup and pancakes. You love it so much, in fact, that you will eat it any meal it is available. You find yourself looking at the menus for all your favorite restaurants every day to see if this combination is available, and realized you can do this more easily with a program. Given a list of restaurant menus, decide where to eat.

Input

The first line of input contains a number $n$ ($1 \le n \le 10$), the number of restaurants. Then follow the $n$ restaurant menus. Each menu starts with a line containing a number $k$ ($1 \le k \le 10$), the number of menu items for the day. The remainder of the menu consists of $k + 1$ lines, each containing a nonempty string of at most $100$ characters. The first of these lines is the restaurant name, and the rest are menu items. Strings consist only of lower case letters ‘a’-‘z’ and spaces, and they always start and end with a letter. All restaurant names are unique.

Output

Output a single line. If at least one restaurant has both “pea soup” and “pancakes” as menu items, output the name of the first of those restaurants, by the order in which the restaurants appear in the input. Otherwise, output “Anywhere is fine I guess”.

Sample Input 1 Sample Output 1
2
2
q
potatoes
salad
3
nymble
pancakes
pea soup
punsch
nymble
Sample Input 2 Sample Output 2
4
2
asian wok house
paa soup
pancakes
2
kebab kitchen
pea  soup
pancakes
2
la campus
tasty pea soup
pancakes
3
slime stand
slime
pea soup and pancakes
slime
Anywhere is fine I guess

Please log in to submit a solution to this problem

Log in