{"extraResources":{"example.01.mu":"TVXzATUNCjMgMCAyIDEgMA0K","example.02.mu":"TVXzATENCjANCg==","example.03.mu":"TVXzATINCjAgMA0K"},"scoring":null,"notes":"Let us check that the answer to the first example is consistent with the given numbers $a_i$.\r\n\r\n\\begin{enumerate}\r\n\\item Runner $1$ has upset runners $2$, $4$, and $5$.\r\n\\item Runner $2$ took the last place and, therefore, has not outperformed anyone.\r\nHence, runner $2$ has performed no upsets.\r\n\\item The runner with the number $3$ took the first place and, therefore, has upset both runners with larger numbers.\r\n\\item The runner with the number $4$ has upset a single other runner: runner $5$.\r\n\\item There are no runners with numbers larger than $5$.\r\nTherefore, runner $5$ has performed no upsets.\r\n\\end{enumerate}\r\n","legend":"There are $n$ runners participating in a race.\r\nEach runner is assigned a unique number from $1$ to $n$.\r\nThey have arrived at the finish line in some specific order, with no ties.\r\nLet us say that runner $i$ has performed an \\textit{upset} of runner $j$ if $i$ finished before $j$ and $i < j$.\r\n\r\nFor each $i$ from $1$ to $n$, it is known that runner $i$ has performed exactly $a_i$ upsets of other runners.\r\nYour task is to restore the competition results: the number of the runner that took first place, the number of the runner that took second place, \\ldots, the number of the runner that took the $n$-th place.\r\nIt can be shown that the answer is always unique, assuming that it exists.\r\n","authorLogin":"Kaban-5","language":"english","timeLimit":1000,"output":"Print $n$ space-separated integers: the numbers of runners who took first, second, \\ldots, $n$-th place.\r\n","inputFile":"stdin","outputFile":"stdout","input":"The first line of the input contains an integer $n$ from $1$ to $1000$: the number of runners.\r\n\r\nThe second line contains $n$ space-delimited integers $a_1, a_2, \\ldots, a_n$, where $a_i$ is the number of upsets performed by runner $i$.\r\n\r\nThe given data is consistent with some possible results of the competition: for every $i$, it is true that $a_i \\le n - i$.\r\nIn particular, $a_n = 0$.","authorName":"Vladislav Makarov","sampleTests":[{"output":"3 1 4 5 2\r\n","input":"5\r\n3 0 2 1 0\r\n","inputFile":"example.01","outputFile":"example.01.a"},{"output":"1\r\n","input":"1\r\n0\r\n","inputFile":"example.02","outputFile":"example.02.a"},{"output":"2 1\r\n","input":"2\r\n0 0\r\n","inputFile":"example.03","outputFile":"example.03.a"}],"name":"Competition Results","interaction":null,"memoryLimit":1073741824,"tutorial":""}