n=int(input())
L=[]
for i in range(n):L+=[input()]
s=input()
x=len(s)
G=32*["*"]
for i in range(n):
if L[i][:x]==s: G[ord(L[i][x])-62]=L[i][x]
f=""
for i in range(32):
f+=G[i]
if (i+1)%8==0:
print(f)
f=""
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
3432 KB |
Output is correct |
2 |
Correct |
25 ms |
3300 KB |
Output is correct |
3 |
Correct |
25 ms |
3300 KB |
Output is correct |
4 |
Correct |
26 ms |
3300 KB |
Output is correct |
5 |
Correct |
26 ms |
3300 KB |
Output is correct |
6 |
Correct |
27 ms |
3300 KB |
Output is correct |
7 |
Correct |
25 ms |
3300 KB |
Output is correct |
8 |
Correct |
25 ms |
3300 KB |
Output is correct |
9 |
Correct |
26 ms |
3384 KB |
Output is correct |
10 |
Correct |
25 ms |
3300 KB |
Output is correct |