{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027left_view\u0027]);}, 2000);\u003c/script\u003e\n\u003cdiv class\u003d\"panel_content\"\u003e\n Ms.Fang loves painting very much. She paints GFW(Great Funny Wall) every day. Every day before painting, she produces a wonderful color of pigments by mixing water and some bags of pigments. On the K-th day, she will select K specific bags of pigments and mix them to get a color of pigments which she will use that day. When she mixes a bag of pigments with color A and a bag of pigments with color B, she will get pigments with color A xor B.\n \u003cbr\u003eWhen she mixes two bags of pigments with the same color, she will get color zero for some strange reasons. Now, her husband Mr.Fang has no idea about which K bags of pigments Ms.Fang will select on the K-th day. He wonders the sum of the colors Ms.Fang will get with\n \u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/e404f22439e39c897395b3f0a8f006b4?v\u003d1618841585\"\u003e different plans.\n \u003cbr\u003e\n \u003cbr\u003eFor example, assume n \u003d 3, K \u003d 2 and three bags of pigments with color 2, 1, 2. She can get color 3, 3, 0 with 3 different plans. In this instance, the answer Mr.Fang wants to get on the second day is 3 + 3 + 0 \u003d 6.\n \u003cbr\u003eMr.Fang is so busy that he doesn’t want to spend too much time on it. Can you help him?\n \u003cbr\u003eYou should tell Mr.Fang the answer from the first day to the n-th day.\n\u003c/div\u003e\n求n个数里面,取i个数异或的所有组合的和,i取1~n"}},{"title":"Input","value":{"format":"HTML","content":"There are several test cases, please process till EOF.\n\u003cbr\u003eFor each test case, the first line contains a single integer N(1 \u0026lt;\u003d N \u0026lt;\u003d 10\u003csup\u003e3\u003c/sup\u003e).The second line contains N integers. The i-th integer represents the color of the pigments in the i-th bag."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output N integers in a line representing the answers(mod 10\u003csup\u003e6\u003c/sup\u003e +3) from the first day to the n-th day."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e4\n1 2 10 1\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e14 36 30 8\u003c/pre\u003e"}}]}