407126: GYM102697 097 Neon Lights

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

097. Neon Lightstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Neon Lights

You are trying to find strings of text to put on neon lights. You want to fully test the extent of the neon lights' writing style for letters, so you want to pick the string of text that has the highest number of distinct (different) letters from a selection of possible strings of text.

Input

The first line of input contains a positive integer $$$n$$$ indicating the number of strings of text that you are considering putting on neon lights. The next $$$n$$$ lines each contain each string of text, consisting of only lowercase letters and spaces.

Output

Output the string of text from the possibilities which has the highest number of distinct letters. If two strings of text contain the same number of distinct letters, choose the one that comes first in the input file.

ExamplesInput
6
coderams club
neon lights
kraftwerk
this is a long string of text
abababababababababcabababab
short
Output
this is a long string of text
Input
3
the quick brown fox jumps over the lazy dog
abcdefghijklmnopqrstuvwxy
hello world
Output
the quick brown fox jumps over the lazy dog
Input
3
abcde
abc
edcba
Output
abcde

加入题单

算法标签: