Koishi gives you an array $B$ of length $n$ satisfying $1 \leq B_1 \leq B_2 \leq \cdots \leq B_n \leq n+1$.
Let $S(T)$ denote the set of numbers that appear in array $T$. She asks you whether an array $A$ of length $n$ exists so that for any $l, r(1 \leq l \leq r \leq n)$, $S(A[l,r])=S(A[1,n])$ holds if and only if $r \ge B_l$.
$A[l,r]$ represents the sub-array of $A$ formed by $A_l, A_{l+1}, \cdots, A_{r}$.
Notice: If there exists a $i(1\leq i\leq n)$, that $B_i<i$ holds, the required $A$ must not exist.