{"raw_statement":[{"iden":"problem statement","content":"For an integer array $A=(A_1, A_2, \\ldots, A_{N + K-1})$ ($1 \\leq A_i \\leq N+K-1$), let's construct an array $B=(B_1, B_2, \\ldots, B_N)$, where $B_i$ is the number of distinct elements in $A_i,A_{i+1},\\ldots,A_{i+K-1}$.\nYou are given $B_1, B_2, \\ldots, B_N$. Determine if there exists an array $A$ which could have produced such an array $B$, and if yes, construct one.\nSolve $T$ test cases for each input file."},{"iden":"constraints","content":"*   $1 \\le T \\le 5 \\cdot 10^4$\n*   $2 \\le N \\le 2 \\cdot 10^5$\n*   $2 \\le K \\le 2 \\cdot 10^5$\n*   $1 \\le B_i \\le K$\n*   The sum of $N$ in one input file doesn't exceed $2\\cdot 10^5$.\n*   The sum of $K$ in one input file doesn't exceed $2\\cdot 10^5$.\n*   All values in the input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$T$\n$case_1$\n$case_2$\n$\\vdots$\n$case_T$\n\nEach case is in the following format:\n\n$N$ $K$\n$B_1$ $B_2$ $\\ldots$ $B_N$"},{"iden":"sample input 1","content":"3\n3 3\n1 2 1\n4 3\n1 2 2 1\n6 4\n3 3 3 3 3 3"},{"iden":"sample output 1","content":"NO\nYES\n1 1 1 2 2 2 \nYES\n1 2 3 1 2 3 1 2 3"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}