_20050909cjk @ 2024-12-06 13:12:25
values1=input().split()
values1.sort(reverse=False)
values2=input()
for i in values2 : ord_num=ord(i)ord("A")
value=values1[ord_num ] print(value,end=" ")