Adam has an array aaaconsisting of nnn integers a0,a1,...,an1a_0, a_1, ..., a_{n-1}a0,a1,...,an1. We call this array beautiful if the number of occurrences of iii is aia_iai for i∈[0,n1]iin [0,n-1]i∈[0,n1]. For example: [1,2,1,0][1,2,1,0][1,2,1,0]is beautiful. In this array, 000 appears 111 time, 111 appears 222 times, 222 appears 111 time, and 333 appears 000 times, and a0=1,a1=2,a2=1,a3=0a_0=1,a_1=2,a_2=1,a_3=0a0=1,a1=2,a2=1,a3=0. [0,1][0,1][0,1]is not beautiful. Because a0=0a_0=0a0=0but in fact 000 appears 111 time. Find a beautiful array of length nnn. If there are multiple answers, output any. If there is no beautiful array of length nnn, output 1-11.
Adam has an array aaa consisting of nnn integers a0,a1,...,an−1a_0, a_1, ..., a_{n-1}a0,a1,...,an−1. We call this array beautiful if the number of occurrences of iii is aia_iai for i∈[0,n−1]iin [0,n-1]i∈[0,n−1]. For example: [1,2,1,0][1,2,1,0][1,2,1,0] is beautiful. In this array, 000 appears 111 time, 111 appears 222 times, 222 appears 111 time, and 333 appears 000 times, and a0=1,a1=2,a2=1,a3=0a_0=1,a_1=2,a_2=1,a_3=0a0=1,a1=2,a2=1,a3=0. [0,1][0,1][0,1] is not beautiful. Because a0=0a_0=0a0=0 but in fact 000 appears 111 time. Find a beautiful array of length nnn. If there are multiple answers, output any. If there is no beautiful array of length nnn, output −1-1−1.
