B. Lowest Common Ancestor
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Scientists have been studying a variety of species, and they want to understand the evolutionary relationships between the different animals. They notice a very peculiar property: if species $$$A$$$ is an ancestor of species $$$B$$$, then the species name for $$$A$$$ is a suffix for a species name for $$$B$$$! Given a set of species names, can you determine which species in the list is an ancestor of all the other species? If no such species exists, print "Not found" (without quotes).

Input

The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of known species.

The following $$$n$$$ lines contain a single string $$$s_i$$$ ($$$1 \leq |s_i| \leq 1000$$$) — the name of the $$$i$$$th species. $$$s_i$$$ consists of the lowercase letters ('a'–'z') and hyphens ('-'). It is also guaranteed that all species names are distinct.

Output

If one of these species is an ancestor of all the others, output the name of the species. Otherwise, output "Not found" without quotes.

Examples
Input
4
jay
blue-jay
red-jay
purplejay
Output
jay
Input
4
cow
sheep
goat
fish
Output
Not found