{"raw_statement":[{"iden":"problem statement","content":"You are given positive integers $N$ and $K$.\nAn integer sequence of length $NK$ where each integer from $1$ to $N$ appears exactly $K$ times is called a **good** integer sequence.\nLet $S$ be the number of good integer sequences. Find the $\\operatorname{floor}((S+1)/2)$\\-th good integer sequence in lexicographical order. Here, $\\operatorname{floor}(x)$ represents the largest integer not exceeding $x$.\nWhat is lexicographical order for sequences?A sequence $S = (S_1,S_2,\\ldots,S_{|S|})$ is **lexicographically smaller** than a sequence $T = (T_1,T_2,\\ldots,T_{|T|})$ if either 1. or 2. below holds. Here, $|S|$ and $|T|$ represent the lengths of $S$ and $T$, respectively.\n\n1.  $|S| \\lt |T|$ and $(S_1,S_2,\\ldots,S_{|S|}) = (T_1,T_2,\\ldots,T_{|S|})$.\n2.  There exists an integer $1 \\leq i \\leq \\min\\lbrace |S|, |T| \\rbrace$ such that both of the following hold:\n    *   $(S_1,S_2,\\ldots,S_{i-1}) = (T_1,T_2,\\ldots,T_{i-1})$\n    *   $S_i$ is (numerically) smaller than $T_i$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 500$\n*   $1 \\leq K \\leq 500$\n*   All input values are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $K$"},{"iden":"sample input 1","content":"2 2"},{"iden":"sample output 1","content":"1 2 2 1\n\nThere are six good integer sequences:\n\n*   $(1,1,2,2)$\n*   $(1,2,1,2)$\n*   $(1,2,2,1)$\n*   $(2,1,1,2)$\n*   $(2,1,2,1)$\n*   $(2,2,1,1)$\n\nTherefore, the answer is the 3rd sequence in lexicographical order, $(1,2,2,1)$."},{"iden":"sample input 2","content":"1 5"},{"iden":"sample output 2","content":"1 1 1 1 1"},{"iden":"sample input 3","content":"6 1"},{"iden":"sample output 3","content":"3 6 5 4 2 1"},{"iden":"sample input 4","content":"3 3"},{"iden":"sample output 4","content":"2 2 2 1 3 3 3 1 1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}