Given a natural number and non-negative integers k_1, k_2, \ldots, k_n such that

Your task is to construct the lexicographically smallest permutation of numbers from to , such that in the decomposition of this permutation into non-overlapping cycles, there are k_1 cycles of length , k_2 cycles of length , ..., k_n cycles of length . A permutation x = (x_1, x_2, \ldots, x_n) is lexicographically smaller than a permutation y = (y_1, y_2, \ldots, y_n) if there exists i \in \{1, 2, \ldots, n\} such that x_j = y_j for all 1 \leq j < i and x_i < y_i.
The first line contains a natural number (1 \leq n \leq 10^5). The second line contains non-negative integers k_1, k_2, \ldots, k_n separated by spaces, satisfying k_1 + 2k_2 + \ldots + nk_n = n.
Output a single line containing numbers separated by spaces: the elements of the required permutation.
Example 1