CF159C String Manipulation 1.0
Description
One popular website developed an unusual username editing procedure. One can change the username only by deleting some characters from it: to change the current name $ s $ , a user can pick number $ p $ and character $ c $ and delete the $ p $ -th occurrence of character $ c $ from the name. After the user changed his name, he can't undo the change.
For example, one can change name "arca" by removing the second occurrence of character "a" to get "arc".
Polycarpus learned that some user initially registered under nickname $ t $ , where $ t $ is a concatenation of $ k $ copies of string $ s $ . Also, Polycarpus knows the sequence of this user's name changes. Help Polycarpus figure out the user's final name.
Input Format
The first line contains an integer $ k $ ( $ 1
Output Format
Print a single string — the user's final name after all changes are applied to it.
Explanation/Hint
Let's consider the first sample. Initially we have name "bacbac"; the first operation transforms it into "bacbc", the second one — to "acbc", and finally, the third one transforms it into "acb".