{"trustable":true,"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":"\u003cdiv class\u003d\"panel_content\"\u003eRock-paper-scissors is a zero-sum hand game usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are \"rock\", \"paper\", and \"scissors\". The game has only three possible outcomes other than a tie: a player who decides to play rock will beat another player who has chosen scissors (\"rock crushes scissors\") but will lose to one who has played paper (\"paper covers rock\"); a play of paper will lose to a play of scissors (\"scissors cut paper\"). If both players choose the same shape, the game is tied and is usually immediately replayed to break the tie.\u003cbr\u003e\u003cbr\u003eRecently, there is a upgraded edition of this game: rock-paper-scissors-Spock-lizard, in which there are totally five shapes. The rule is simple: scissors cuts paper; paper covers rock; rock crushes lizard; lizard poisons Spock; Spock smashes scissors; scissors decapitates lizard; lizard eats paper; paper disproves Spock; Spock vaporizes rock; and as it always has, rock crushes scissors.\u003cbr\u003e\u003cbr\u003eBoth rock-paper-scissors and rock-paper-scissors-Spock-lizard are balanced games. Because there does not exist a strategy which is better than another. In other words, if one chooses shapes randomly, the possibility he or she wins is exactly $50\\%$ no matter how the other one plays (if there is a tie, repeat this game until someone wins). Given an integer $N$, representing the count of shapes in a game. You need to find out if there exist a rule to make this game balanced.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of input contains an integer t, the number of test cases. t test cases follow.\u003cbr\u003eFor each test case, there is only one line with an integer $N~(2\\leq N \\leq 1000)$, as described above.\u003cbr\u003e\u003cbr\u003eHere is the sample explanation.\u003cbr\u003e\u003cbr\u003eIn the first case, donate two shapes as A and B. There are only two kind of rules: A defeats B, or B defeats A. Obviously, in both situation, one shapes is better than another. Consequently, this game is not balanced.\u003cbr\u003e\u003cbr\u003eIn the second case, donate two shapes as A, B and C. If A defeats B, B defeats C, and C defeats A, this game is balanced. This is also the same as rock-paper-scissors.\u003cbr\u003e\u003cbr\u003eIn the third case, it is easy to set a rule according to that of rock-paper-scissors-Spock-lizard."}},{"title":"Output","value":{"format":"HTML","content":"For each test cases, output \"Balanced\" if there exist a rule to make the game balanced, otherwise output \"Bad\"."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n2\r\n3\r\n5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eBad\r\nBalanced\r\nBalanced\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}