Identify, Sort, Index, Solve
Time limit1sMemory limit512 MB
Given N problem titles with numbers and difficulties, sort them by number and output the uppercased D-th character of each title in that order.
- Level
Easy2 of 10
- Topics
- Sorting, Implementation, String
- Solved
- No attempts yet
Problem
ISIS puzzles are puzzles solved with the procedure Identify, Sort, Index, Solve.
Haibi, who likes puzzles, decided to write ISIS puzzle problems for HCPC, like the one below.
- You are given strings .
- Identify: Find the title that matches each string, then find that problem's number and difficulty .
- Sort: Sort the problems in ascending order of their number .
- Index: From each problem name , extract the -th character. If the extracted character is lowercase, convert it to uppercase.
- Solve: Arrange the characters extracted in the Index step in the order sorted in the Sort step.
Input
The first line contains the number of entries . ()
From the second line, lines follow, each with a problem title , number , and difficulty . (; ; )
consists only of uppercase and lowercase English letters and digits.
No two problems have the same number.
Output
Print the string obtained after the Solve step.