l,s=input(),input() for i,j in enumerate(list(l)):s=s.replace(str(i),j) print(s)