#K45877. First Names in Alphabetical Order

    ID: 27851 Type: Default 1000ms 256MiB

First Names in Alphabetical Order

First Names in Alphabetical Order

Given a list of names, your task is to find the name(s) that come first in alphabetical order. If the minimal name appears multiple times, output all of them in the same order as they appear in the input. Names are compared using standard lexicographical order (i.e., characters are compared by their ASCII values).

If the list is empty, produce no output.

For example, for the input list ["Tom", "Jerry", "Anna", "Bob"], the answer would be "Anna".

inputFormat

The first line of input contains an integer N representing the number of names. The following N lines each contain a single name.

outputFormat

Output the name(s) that are equal to the alphabetically smallest name in the order they appear in the input, separated by a single space. If there are no names (i.e. when N is 0), do not output anything.

## sample
1
Tom
Tom