Write a program that provided a sequence of words prints the longest
word in the sequence that starts with a.
The input has one or more cases. Each case starts with a non negative integer followed by a sequence of words consisting of lowercase letters.
For each case, the program has to print in a line the longest word
starting with a. In case of a tie, it will
write the lowest in the alphabetical order —the order defined by the
standard inequality comparison on strings—. If there is no word starting
with ’a’, the program has to write no one.
Input
6 ab alio spectes alteri quod feceris 4 ad augusta per angusta 0 5 ad mores natura recurrit damnatos 4 faber quisque fortunae suae
Output
alteri angusta no one ad no one