#B. B.这是个签到题

    Type: Default 1000ms 256MiB

B.这是个签到题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

今天小朋友刚上幼儿园,上学第一天就交了许多朋友,但是小朋友太小啦,记不住朋友们的名字,只记得交换名字的顺序和对应的名字。

Description

这时候小朋友想知道朋友们名字排序后打乱的那个顺序,聪明的你能帮帮忙吗QAQ~(ps: 名字排序排第一个字母就行,字典序小的在前,遇到相同的就按题目顺序输出)

Input

输入每个样例会有n(1<=n<=1e4,)行,接下来会有n行,每一行一个数字和一个名字(名字长度不会超过10,且都是小写)。

Output

对于每组测试案例,输出名字排序后对应的数字就行,答案一行,行末没有空格。

Samples

3
1 alice
2 john
3 herry
1 3 2

Limitation

1s, 1024KiB for each test case.

SWPU ROUND #1 (DIV.3)

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2021-11-7 9:00
End at
2021-11-7 11:30
Duration
2.5 hour(s)
Host
Partic.
28