-->
当前位置:首页 > 题库

PROGRAMMING:Xiaojiang's password

Luz5年前 (2021-05-10)题库400
Xiaojiang is a BiliBili website controller, so he has registered countless accounts, but the names of the accounts are not necessarily different. Recently, he wants to know the name of an account. Because he has changed his name to hematemesis, he will give you the record of his name change. I hope you can help him find out the current name of an account.
###Input format:
The first line is an integer n, which represents the number of modified information( 1<=n<=20000)
From the second line to the N + 1 line, there are two strings a and B in each line. A is the name and B is the account number (1 < = | a |, | B | < = 20, | s | stands for the length of string s)
The number m in the next line is the number of queries( 1<=m<=40000)
Next, there are m lines, one account data for each line.
Note: the account number is composed of a series of numbers, and the name is composed of numbers and letters.
###Output format:
M rows of data represent each query. Output format: "case a: B",. A is the serial number, starting from 0.
When the answer exists, B is the answer, and when the query is empty, B is: "no ID!"( (without quotation marks)
###Input example:
```in
three
jxb 897956
ydb 086362
jdb 897956
two
eight hundred and ninety-seven thousand nine hundred and fifty-six
one hundred and twenty-three
```
###Output example:
```out
case0:jdb
case1:no ID!
```







answer:If there is no answer, please comment