{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eGrammy is playing a game with her roommate Alice on a sequence $$$A$$$ with $$$n$$$ non-negative integers $$$A_1,A_2,\\dots,A_n$$$. The rules of the game are described as follows. \u003c/p\u003e\u003col\u003e \u003cli\u003e They play the game by moving the single token on the sequence, initially the token is at position $$$k$$$. \u003c/li\u003e\u003cli\u003e Grammy takes the first move, and they take moves alternatively. \u003c/li\u003e\u003cli\u003e In any move with the token at position $$$i$$$, the current player must move the token to the next position $$$j$$$ such that $$$j\u0026gt;i$$$ and $$$A_j$$$ differs from $$$A_i$$$ on at most one bit in binary representation. \u003c/li\u003e\u003cli\u003e The player who can\u0027t make any legal move loses the game. \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eThey play this game many times and the sequence can be modified many times. Grammy wants to ask you for some initial states who will win the game if both play optimally.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of input contains 2 integers $$$n$$$ and $$$m$$$ ($$$1\\leq n,m\\leq 200\\,000$$$), denoting the length of the sequence and the number of operations.\u003c/p\u003e\u003cp\u003eThe second line contains $$$n$$$ integers $$$A_1,A_2,\\dots,A_n$$$ ($$$0\\leq A_i\\leq 255$$$), denoting the sequence $$$A$$$.\u003c/p\u003e\u003cp\u003eThe next $$$m$$$ lines each contains 2 integers $$$op$$$ ($$$1\\leq op\\leq 2$$$) and $$$k$$$, denoting each operation: \u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$op\u003d1$$$ means a modification on the sequence. Grammy will append an integer $$$k$$$ ($$$0\\leq k\\leq 255$$$) at the end of the sequence so the sequence becomes $$$A_1, A_2, \\dots, A_{N+1}$$$ where $$$N$$$ is the current length of the sequence before modification. \u003c/li\u003e\u003cli\u003e $$$op\u003d2$$$ means a new game starts with the token at position $$$k$$$ ($$$1\\leq k\\leq N$$$), where $$$N$$$ is the current length of the sequence. You need to predict the winner of this game. \u003c/li\u003e\u003c/ul\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each operation with $$$op\u003d2$$$, output one line containing \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eGrammy\u003c/span\u003e\" if Grammy will win, or \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eAlice\u003c/span\u003e\" if Alice will win when they play optimally.\u003c/p\u003e"}},{"title":"Examples","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\u003e5 5\n1 2 3 4 5\n1 6\n2 5\n1 7\n2 5\n2 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eAlice\nGrammy\nAlice\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}