{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e\r\nh1,h2,h3,h4,h5,h6{margin-bottom:0;}div.textBG p{margin: 0 0 0.0001pt;}\u003c/style\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cdiv style\u003d\"clear:both\"\u003e\r\n\t\u0026nbsp;\u003c/div\u003e\r\n\u003cp\u003e\r\n\t\u003cspan data-scayt_word\u003d\"Trung\" data-scaytid\u003d\"1\"\u003eTrung\u003c/span\u003e is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e\u003ctex2html_verbatim_mark\u003e\u003c!-- MATH\r\n $(1 \u003c N \u003c 10000)$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e(1 \u0026lt; \u003ci\u003eN\u003c/i\u003e \u0026lt; 10000)\u003c/span\u003e\u003ctex2html_verbatim_mark\u003e . After that, he counts the number of times each digit (0 to 9) appears in the sequence. For example, with \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eN\u003c/i\u003e \u003d 13\u003c/span\u003e\u003ctex2html_verbatim_mark\u003e , the sequence is: \u003c/tex2html_verbatim_mark\u003e\u003c/tex2html_verbatim_mark\u003e\u003c/tex2html_verbatim_mark\u003e\u003c/p\u003e\r\n\u003cp\u003e\r\n\t12345678910111213\u003c/p\u003e\r\n\u003cp\u003e\r\n\tIn this sequence, 0 appears once, 1 appears 6 times, 2 appears 2 times, 3 appears 3 times, and each digit from 4 to 9 appears once. After playing for a while, \u003cspan data-scayt_word\u003d\"Trung\" data-scaytid\u003d\"2\"\u003eTrung\u003c/span\u003e gets bored again. He now wants to write a program to do this for him. Your task is to help him with writing this program.\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003ch2\u003e\r\n\t\u003cfont color\u003d\"#ff0000\" size\u003d\"4\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001001000000000000000\"\u003e Input\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\r\n\u003cp\u003e\r\n\tThe input file consists of several data sets. The first line of the input file contains the number of data sets which is a positive integer and is not bigger than 20. The following lines describe the data sets.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tFor each test case, there is one single line containing the number \u003cspan class\u003d\"MATH\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e\u003ctex2html_verbatim_mark\u003e . \u003c/tex2html_verbatim_mark\u003e\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003ch2\u003e\r\n\t\u003cfont color\u003d\"#ff0000\" size\u003d\"4\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001002000000000000000\"\u003e Output\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\r\n\u003cp\u003e\r\n\tFor each test case, write sequentially in one line the number of digit \u003c!-- MATH\r\n $0, 1, \\ldots 9$\r\n --\u003e\u003cspan class\u003d\"MATH\"\u003e0, 1,...9\u003c/span\u003e\u003ctex2html_verbatim_mark\u003e separated by a space. \u003c/tex2html_verbatim_mark\u003e\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003ch2\u003e\r\n\t\u003cfont color\u003d\"#ff0000\" size\u003d\"4\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001003000000000000000\"\u003e Sample Input\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cpre\u003e\r\n2 \r\n3 \r\n13\r\n\u003c/pre\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003ch2\u003e\r\n\t\u003cfont color\u003d\"#ff0000\" size\u003d\"4\"\u003e\u003ca href\u003d\"\" name\u003d\"SECTION0001004000000000000000\"\u003e Sample Output\u003c/a\u003e\u0026nbsp;\u003c/font\u003e\u003c/h2\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cpre\u003e\r\n0 1 1 1 0 0 0 0 0 0 \r\n1 6 2 2 1 1 1 1 1 1\r\n\u003c/pre\u003e"}}]}