Under construction

Still being built. Things may change

Team Name Selection 2

Interview

Time limit1sMemory limit1024 MB

Summary
Given N candidate team names, print the one that has at most 10 characters, no more uppercase than lowercase letters, and at least one non-digit character.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Members of the problem solving study group SCCC in the Department of Computer Science and Engineering at Soongsil University spend a lot of time each year choosing a team name for team contests such as SCON and ICPC. Picking one name from several candidates is especially hard. So Jeonghwi, who has two semesters left before graduation, wrote a guideline to spare the members further trouble.

According to Jeonghwi's guideline, the more of the conditions below a name meets, the better the name is.

  • Lowercase letters are cuter than uppercase letters. So uppercase letters must not appear more often than lowercase letters.
  • If a team name is too complicated, the host may not read it properly. So a team name must be 10 characters or fewer.
  • A team name made up only of digits is said to be jinxed: such a team never reaches the World Finals. So a team name must contain at least one character that is not a digit.

Given NN team name candidates, write a program that prints the team name that satisfies all three conditions.

Input

The first line contains the number of team name candidates NN.

From the second line onward, the next NN lines each contain one candidate S1,S2,⋯ ,SNS_1, S_2, \cdots, S_N.

Output

Print the team name that satisfies all three conditions.

Constraints

  • 1≤N≤1001\le N\le 100
  • 1≤∣Si∣≤20(1≤i≤N)1 \le |S_i| \le 20 (1 \le i \le N). That is, every candidate is a string of length 20 or less.
  • Each SiS_i consists only of lowercase letters, uppercase letters, digits, and hyphens (-).
  • Exactly one team name satisfies all three conditions.

Hints

The ASCII codes of uppercase letters, lowercase letters, digits, and the hyphen are 65 to 90, 97 to 122, 48 to 57, and 45, respectively.

181920 is the bronze medal team at the 2020 ICPC Asia Seoul Regional Contest.

LongestPathToWF is a bronze medal team at the 2021 ICPC Asia Seoul Regional Contest and advanced to the 2022 ICPC World Finals.

NLP is a silver medal team at the 2022 ICPC Asia Seoul Regional Contest and advanced to the 2023 ICPC World Finals.

PS akgwi won a silver medal at the 2023 ICPC Asia Seoul Regional Contest and a silver medal at the 2024 ICPC Asia Pacific Championship, and advanced to the 2024 ICPC World Finals.

Examples1

  1. Example 1

    Input
    4
    181920
    LongestPathToWF
    NLP
    PS-akgwi
    
    Expected output
    PS-akgwi