cho.sh
Notes
Loading...

Basketball Game

Time limit

1s

Memory limit

128 MB

Problem

A national basketball coach must choose a starting lineup for the next match. To make the lineup easy to remember, the coach wants to choose five players whose surnames start with the same lowercase English letter.

For every first letter that appears in at least five players' surnames, that letter can be used to form such a lineup. Find all possible first letters.

Input

The first line contains the number of players N (1 <= N <= 150).

Each of the next N lines contains one player's surname. Each surname consists only of lowercase English letters and has length at most 30.

Output

If no first letter appears in at least five surnames, print PREDAJA.

Otherwise, print all qualifying first letters in lexicographic order with no spaces between them.