시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB176533.333%

문제

A subsegment (contiguous subarray) of an array is interesting if the sum of values on this subsegment is divisible by $3$.

You are given two integers $n$ and $k$. Your goal is to construct the lexicographically minimal array of length $n$ such that it consists only of integers $0$, $1$, and $2$, and has exactly $k$ distinct interesting subsegments.

Array $a$ of length $n$ is lexicographically smaller than array $b$ of the same length if there is $1 \le i \le n$ such that $a_j = b_j$ for $j < i$ and $a_i < b_i$. Two subsegments are distinct if some element of the array belongs to one subsegment but not to the other.

입력

The only line of input contains two integers $n$ and $k$ ($1 \le n \le 10^6$, $0 \le k \le 10^{18}$).

출력

Output -1 if there is no such array. Otherwise, output the lexicographically smallest array of size $n$ which satisfies the constraints.

예제 입력 1

5 3

예제 출력 1

0 1 0 1 0

예제 입력 2

5 5

예제 출력 2

-1