2026-04-06 17:32:41 +09:00

2 lines
91 B
Python

a = sorted(list(map(int, input().split())))
print(*[a[ord(c) - ord('A')] for c in input()])