Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sequence = input().split()
- text = [el for el in input()]
- message = ""
- for el in sequence:
- current_index = 0
- for index in el:
- current_index += int(index)
- if current_index >= len(text):
- while current_index >= len(text):
- current_index -= len(text)
- else:
- message += text[current_index]
- text.pop(current_index)
- else:
- message += text[current_index]
- text.pop(current_index)
- print(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement