AlexG2230954

Untitled

May 14th, 2022 (edited)
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. s = input()
  2. ind_list = tuple(map(int, input().split()))
  3. perm = {new_ind : last_ind for last_ind, new_ind in enumerate(ind_list)}
  4.  
  5. print("".join(s[perm[i]] for i in range(len(s))))
Add Comment
Please, Sign In to add comment