Bob just learned about bitwise operators. Since Alice is an expert, she decided to play a game, she will give a number $x$ to Bob and will ask some questions:
There will be 4 different kinds of queries:-
- 
Alice gives an integer $i$ and Bob has to report the status of the $i^{th}$ bit in $x$, the answer is $"ON"$ if it is on else $"OFF"$.
- 
Alice gives an integer $i$ and Bob has to turn on the $i^{th}$ bit in $x$.
- 
Alice gives an integer $i$ and Bob has to turn off the $i^{th}$ bit in $x$.
- 
Alice gives two integers $p$ and $q$ and in the binary representation of $x$ Bob has to swap the $p^{th}$ and the $q^{th}$ bits.
The value of $x$ changes after any update operation.
positions $i$, $p$, and $q$ are always counted from the right or from the least significant bit.
If anyone of $i$, $p$, or $q$ is greater than the number of bits in the binary representation of $x$, consider $0$ at that position.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- the first line of each test case contains two space-separated integers $x, Q$.
- $2Q$ lines follow.
- first line is an integer, the query type.
- for each query of type 1 to 3, there will be the integer $i$
- for the query of type 4, there will be two space-separated integers, the integers $p, q$

-----Output:-----
For the queries of the first kind, print $"ON"$ or $"OFF"$.

-----Constraints-----
- $1 \leq T \leq 10^3$
- $1 \leq x \leq 10^9$
- $1 \leq Q \leq 10^3$
- $1 \leq i,p,q \leq 30$

-----Sample Input-----
1
2 2
2 
1
1 
1

-----Sample Output:-----
ON

-----EXPLANATION:-----
the binary representation of 2 is 10
for query 1, we just have to update x to 11 (or 3 in decimal).
for the next query, x is now 3 or 11 in binary so the answer is ON.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 't = int(input())\r\nwhile t:\r\n    t -= 1\r\n    b,k = list(map(int, input().split()))\r\n    x = bin(b)[2:]\r\n    n = len(x)\r\n    for j in range(k):\r\n        qu = int(input())\r\n        if 1<=qu<=3:\r\n            i = int(input())\r\n            if qu==1:\r\n                if i<=n:\r\n                    r = n-i+1\r\n                    if x[r-1]==\'0\':\r\n                        print("OFF")\r\n                    else:\r\n                        print("ON")\r\n                else:\r\n                    print("OFF")\r\n            elif qu==2:\r\n                if i<=n:\r\n                    r = n-i+1\r\n                    x =x[0:r-1]+\'1\'+x[r:n]\r\n                else:\r\n                    x = \'1\' + (i-n-1)*\'0\' + x\r\n                    n=i\r\n            elif qu==3:\r\n                if i<=n:\r\n                    r = n-i+1\r\n                    x =x[0:r-1]+\'0\'+x[r:n]\r\n                    \r\n                    \r\n        else:\r\n            p,q = list(map(int, input().split()))\r\n            if p<=n and q<=n:\r\n                r1 = n-p + 1\r\n                r2 = n-q+1\r\n                t1 = x[r1-1]\r\n                t2 = x[r2-1]\r\n                if x[r2-1]!=t1:\r\n                    x = x[0:r2-1] + t1 + x[r2:n]\r\n                if x[r1-1]!=t2:\r\n                    x = x[0:r1-1]+t2+x[r1:n]\r\n                \r\n            elif p<=n:\r\n                r1 = n-p+1\r\n                p1 = x[r1-1]\r\n                x =x[0:r1-1]+\'0\'+x[r1:n]\r\n                if p1==\'1\':\r\n                    x = \'1\'+(q-n-1)*\'0\' + x\r\n                    n = q\r\n            elif q<=n:\r\n                r2 = n-q+1\r\n                p2 = x[r2-1]\r\n                x =x[0:r2-1]+\'0\'+x[r2:n]\r\n                if p2==\'1\':\r\n                    x = \'1\'+(p-n-1)*\'0\' + x\r\n                    n=p\r\n        \r\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14161