Mixtape Management

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Mary has created a mixtape with her favourite reggae tracks. The mixtape consists of a list of MP3 files on her computer that she wants to share with her friends Wendy and Larry. However she knows that her friends have different musical tastes and will therefore also have different preferences for the order in which the tracks are played.

Mary knows that Wendy is a Windows user and Larry is a Linux user and realised that she can use this to her advantage. This is because Windows and Linux use different methods to sort files within a directory in case their names contain numerical data. In Windows, numbers in file names are read as actual numbers, causing the files to be sorted by increasing values of these numbers. In Linux, there is no special handling for numbers, so file names are sorted lexicographically. See Figure M.1 for an example of file sorting on the two operating systems.

LinuxWindows
337.mp37.mp3
34.mp334.mp3
3401.mp379.mp3
7.mp3337.mp3
780.mp3780.mp3
7803.mp33401.mp3
79.mp37803.mp3

Figure M.1: Illustration of the first sample case. Note that the file extensions .mp3 do not influence the ordering and are purely for illustration.

After deciding on the order in which she wants Wendy and Larry to listen to the tracks, Mary has already sorted the files according to Larry's taste. Now she wants to rename the files such that the filenames are distinct positive integers without leading zeroes, they are sorted in increasing lexicographic order, and when sorting them by value the new order will match Wendy's taste. For this purpose, she has come up with a permutation p_1,,p_np\_1,\dots,p\_n that describes how to rearrange Larry's list into Wendy's list: for every ii, the iith number in lexicographic order needs to be the p_ip\_ith smallest by value. Help Mary find a suitable sequence of filenames.

입력

The input consists of:

  • One line with an integer nn (1n1001 \le n \le 100), the number of tracks.
  • One line with nn distinct integers p_1,,p_np\_1,\dots,p\_n (1p_in1 \le p\_i \le n for each ii), the given permutation.

출력

Output nn distinct integers in lexicographically increasing order, your sequence of filenames. All numbers must be positive integers less than 10100010^{1000} and may not contain leading zeroes. Any valid sequence of filenames will be accepted.