Logo
(追記) (追記ここまで)

29881번 - Account Names 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB1141119897.030%

문제

John is preparing for the olympiad and needs a table listing the last name and the account name of each participant. He has a table listing the first name and the last name of each participant, and another one listing the first name and the account name of each participant. Looking at the data, John notices that all the $N$ first names are distinct, and so are all the $N$ last names and also all the $N$ account names.

Write a program to compile the table John needs.

입력

The first line contains an integer $N,ドル the number of participants (1ドル \le N \le 20$).

Each of the following $N$ lines (starting from the second line) contains two space-separated strings: the first name and the last name of one participant.

Each of the following $N$ lines (starting from the line $N+2$) contains two space-separated strings: the first name and the account name of one participant.

Each name consists of 1 to 20 letters of the Latin alphabet. Usernames consist of lower-case letters only. Each first name and each last name starts with an upper-case letter, followed by lower-case letters only.

출력

Output exactly $N$ lines, one line for each participant. Each line should contain the last name and the account name of one participant, separated by a space. The lines may be in any order.

제한

예제 입력 1

3
Juku Kask
Mann Kuusk
Mikk Tamm
Mikk mt
Juku jk
Mann mk

예제 출력 1

Kuusk mk
Tamm mt
Kask jk

힌트

출처

Olympiad > Estonian Informatics Olympiad > 2020-21 > Open Competition 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /