Petya learned a new programming language CALPAS. A program in this language always takes one non-negative integer and returns one non-negative integer as well.

In the language, there are only three commands: apply a bitwise operation AND, OR or XOR with a given constant to the current integer. A program can contain an arbitrary sequence of these operations with arbitrary constants from 0 to 1023. When the program is run, all operations are applied (in the given order) to the argument and in the end the result integer is returned.

Petya wrote a program in this language, but it turned out to be too long. Write a program in CALPAS that does the same thing as the Petya's program, and consists of no more than 5 lines. Your program should return the same integer as Petya's program for all arguments from 0 to 1023.


-----Input-----

The first line contains an integer n (1 ≤ n ≤ 5·10^5) — the number of lines.

Next n lines contain commands. A command consists of a character that represents the operation ("&", "|" or "^" for AND, OR or XOR respectively), and the constant x_{i} 0 ≤ x_{i} ≤ 1023.


-----Output-----

Output an integer k (0 ≤ k ≤ 5) — the length of your program.

Next k lines must contain commands in the same format as in the input.


-----Examples-----
Input
3
| 3
^ 2
| 1

Output
2
| 3
^ 2

Input
3
& 1
& 3
& 5

Output
1
& 1

Input
3
^ 1
^ 2
^ 3

Output
0



-----Note-----

You can read about bitwise operations in https://en.wikipedia.org/wiki/Bitwise_operation.

Second sample:

Let x be an input of the Petya's program. It's output is ((x&1)&3)&5 = x&(1&3&5) = x&1. So these two programs always give the same outputs.

Difficulty: competition

Starter code:

Solutions:
from operator import __or__, __and__, __xor__
from sys import stdin, stdout
n, b, c = int(stdin.readline()), 0, 1023
m = {'|': __or__, '&': __and__, '^': __xor__}
for i in range(n):
    t, v = [i for i in stdin.readline().split()]
    b = m[t](b, int(v))
    c = m[t](c, int(v))
x, o, a = 0, 0, 1023
for i in range(10):
    if ((b >> i) & 1) and ((c >> i) & 1):
        o |= 1 << i
    elif not ((b >> i) & 1) and not ((c >> i) & 1):
        a -= 1 << i
    elif ((b >> i) & 1) and not ((c >> i) & 1):
        x |= 1 << i
stdout.write('3\n| ' + str(o) + '\n^ ' + str(x) + '\n& ' + str(a))
        


from operator import __or__, __and__, __xor__
from sys import stdin, stdout
n, b, c = int(stdin.readline()), 0, 1023
m = {'|': __or__, '&': __and__, '^': __xor__}
for i in range(n):
    t, v = [i for i in stdin.readline().split()]
    b = m[t](b, int(v))
    c = m[t](c, int(v))
x, o, a = 0, 0, 1023
for i in range(10):
    if ((b >> i) & 1) and ((c >> i) & 1):
        o |= 1 << i
    elif not ((b >> i) & 1) and not ((c >> i) & 1):
        a -= 1 << i
    elif ((b >> i) & 1) and not ((c >> i) & 1):
        x |= 1 << i
stdout.write('3\n| ' + str(o) + '\n^ ' + str(x) + '\n& ' + str(a))
        


#!/usr/bin/env python3

def simu(P,i):
    for c,x in P:
        if c=='&':
            i &= x
        elif c=='|':
            i |= x
        else:
            i ^= x
    return i

def simpl(P):
    out0,out1 = simu(P,0),simu(P,1023)
    A,O,X = 1023,0,0
    for i in range(10):
        B01 = (out0>>i)&1,(out1>>i)&1
        if B01==(0,0):
            A ^= 1<<i
        elif B01==(1,0):
            X |= 1<<i
        elif B01==(1,1):
            O |= 1<<i
    return A,O,X

def main():
    n = int(input())
    P = []
    for _ in range(n):
        c,x = input().split()
        P.append((c,int(x)))
    A,O,X = simpl(P)
    print(3)
    print('&',A)
    print('|',O)
    print('^',X)

main()


def n2b(n):
  b = bin(n)[2:]
  r = 10 - len(b)
  return list('0'*r + b)

def b2n(b):
  return int(''.join(b), 2)

def dump_encoded(s):
  ops = []
  op = '&'
  b = ''
  for i in range(10):
    if s[i] == '0':
      b += '0'
    else:
      b += '1'
  ops.append((op, b2n(b)))
  op = '|'
  b = ''
  for i in range(10):
    if s[i] == '1':
      b += '1'
    else:
      b += '0'
  ops.append((op, b2n(b)))
  op = '^'
  b = ''
  for i in range(10):
    if s[i] == 'y':
      b += '1'
    else:
      b += '0'
  ops.append((op, b2n(b)))

  print(len(ops))
  for op, n in ops:
    print(op,n)



# x, y, 0, 1

m = int(input())
ops = []
for i in range(m):
  op, n = input().split(' ')
  n = int(n)
  ops.append((op, n))


s = 1023
for i in range(len(ops)):
  op, n = ops[i]
  if op == '&':
    s = s & n
  elif op == '|':
    s = s | n
  elif op == '^':
    s = s ^ n
b1 = n2b(s)

s = 0
for i in range(len(ops)):
  op, n = ops[i]
  if op == '&':
    s = s & n
  elif op == '|':
    s = s | n
  elif op == '^':
    s = s ^ n
b2 = n2b(s)


g = ''
for k in range(10):
  if b1[k] == b2[k]:
    if b1[k] == '0':
      g += '0'
    else:
      g += '1'
  else:
    if b1[k] == '0':
      g += 'y'
    else:
      g += 'x'

dump_encoded(g)

# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys

"""
created by shhuan at 2017/11/5 16:54

"""

N = int(input())

P = []
for i in range(N):
    P.append(input().split())


N = 2
S = [0, 1023]
T = [v for v in S]
for i in range(N):
    for p, v in P:
        v = int(v)
        if p == '^':
            T[i] ^= v
        elif p == '|':
            T[i] |= v
        else:
            T[i] &= v

a, b, c = 0, 0, 0
for i in range(10, -1, -1):
    a <<= 1
    b <<= 1
    c <<= 1
    c |= 1
    if all([(v>>i) & 1 == 1for v in T]):
        b |= 1
    elif all([(v>>i) & 1 == 0 for v in T]):
        c >>= 1
        c <<= 1
    elif all([(S[j]>>i)&1 != (T[j]>>i)&1 for j in range(N)]):
        a |= 1


print(3)
print('^', a)
print('|', b)
print('&', c)

import sys

n = int(sys.stdin.readline())
stat = [0] * 10 # 0: stay, 1: flip, 2: on, 3: off

for i in range(n):
    op, arg = sys.stdin.readline().split()
    arg = int(arg)

    if op == '&':
        for j in range(10):
            if arg & (1 << j) == 0:
                stat[j] = 3
    elif op == '|':
        for j in range(10):
            if arg & (1 << j) > 0:
                stat[j] = 2
    else:
        for j in range(10):
            if arg & (1 << j) > 0:
                stat[j] ^= 1

print('3')
orarg = 0
for i in range(10):
    if stat[i] == 2:
        orarg |= (1 << i)
print('| ' + str(orarg))

andarg = (1 << 10) - 1
for i in range(10):
    if stat[i] == 3:
        andarg ^= (1 << i)
print('& ' + str(andarg))

xorarg = 0
for i in range(10):
    if stat[i] == 1:
        xorarg += (1 << i)
print('^ ' + str(xorarg))


#!/usr/local/bin/python3

import sys

n = int(sys.stdin.readline())

zero_result = 0
ones_result = 1023

while (n > 0) :
	[op, val] = sys.stdin.readline().split(" ")
	val = int(val)
	n -= 1
	if (op == '&') :
		zero_result = zero_result & val
		ones_result = ones_result & val
	elif (op == '|') :
		zero_result = zero_result | val
		ones_result = ones_result | val
	elif (op == '^') :
		zero_result = zero_result ^ val
		ones_result = ones_result ^ val
	else:
		pass

and_bin = [1 for i in range(10)]
or_bin = [0 for i in range(10)]
xor_bin = [0 for i in range(10)]

for i in range(10) :
	j = 9 - i 
	zero_digit = zero_result >> j 
	ones_digit = ones_result >> j
	zero_result = zero_result - zero_digit*(2**j)
	ones_result = ones_result - ones_digit*(2**j)
	if ((zero_digit == 0) and (ones_digit == 0)) :
		and_bin[j] = 0
	elif ((zero_digit == 1) and (ones_digit == 0)) :
		xor_bin[j] = 1
	elif ((zero_digit == 1) and (ones_digit == 1)) :
		or_bin[j] = 1

and_int = 0
xor_int = 0
or_int = 0

for i in range(10):
	and_int += and_bin[i]*(2**i)
	or_int += or_bin[i]*(2**i)
	xor_int += xor_bin[i]*(2**i)

print(3)
print('&', and_int)
print('|', or_int)
print('^', xor_int)




from sys import *
d = {'|': lambda t: t | k, '&': lambda t: t & k, '^': lambda t: t ^ k}

a, b = 1023, 0
for i in range(int(input())):
    s, q = stdin.readline().split()
    k = int(q)
    a = d[s](a)
    b = d[s](b)

t = [2]
for u in range(1024):
    for v in range(1024):
        if 1023 ^ v == a and u ^ v == b:
            print('2\n|', u, '\n^', v)
            return

f = lambda t: t | k if s == '|' else t & k if s == '&' else t ^ k
a, b = 1023, 0
for i in range(int(input())):
    s, k = input().split()
    k = int(k)
    a, b = f(a), f(b)
print('2\n|', b ^ a ^ 1023, '\n^', 1023 ^ a)

from sys import stdin

BITCOUNT = 10
xONES = (1 << 10) - 1
xZEROS = 0
n = int(stdin.readline())

for i in range(n):
    op, num = stdin.readline().split()
    num = int(num)
    if op == '&':
        xONES &= num
        xZEROS &= num
    elif op == '|':
        xONES |= num
        xZEROS |= num
    else:
        xONES ^= num
        xZEROS ^= num

andmask = 0
xormask = 0
mask = 1
for i in range(BITCOUNT):
    ONESbit = (xONES >> i) & 1
    ZEROSbit = (xZEROS >> i) & 1
    if (ONESbit == 1) and (ZEROSbit == 0):
        andmask += mask
    elif (ONESbit == 0) and (ZEROSbit == 1):
        andmask += mask
        xormask += mask
    elif (ONESbit == 1) and (ZEROSbit == 1):
        xormask += mask
    mask *= 2

print(2)
print('& {}'.format(andmask))
print('^ {}'.format(xormask))

"""
Brandt Smith, Lemuel Gorion and Peter Haddad

codeforces.com

Problem 878A
"""
a, b = 0, 1023

n = int(input())

for i in range(n):
    l, r = input().split(' ')
    r = int(r)

    if l == '|':
        a, b = a | r, b | r
    elif l == '&':
        a, b = a & r, b & r
    elif l == '^':
        a, b = a ^ r, b ^ r

print('3')
print('&', (1023 & a) | b)
print('^', a & (1023 ^ b))
print('|', a & b)

    


n = int(input())
a, b = 1023, 0

for _ in range(n):
    c, d = input().split()
    d = int(d)

    if c == '|':
        a, b = a | d, b | d
    elif c == '&':
        a, b = a & d, b & d
    elif c == '^':
        a, b = a ^ d, b ^ d

print('2\n| {}\n^ {}'.format(a ^ b ^ 1023, a ^ 1023))



# Made By Mostafa_Khaled


import sys
import heapq
import math
from enum import Enum

class Status:
    UNTOUCHED = 1
    FLIPPED = 2
    ONE = 3
    ZERO = 4

bits = [Status.UNTOUCHED]*10
lines = sys.stdin.read().splitlines()

n = int(lines[0])

andNum = 1023
orNum = 0
xorNum = 0
for i in range(1, n+1):
    # print(andNum)
    # print(orNum)
    # print(xorNum)

    operation, num = lines[i].split(' ')
    num = int(num)
    # print(num)
    # print('----')
    if operation == '|':
        andNum=andNum|num
        orNum=orNum|num
        xorNum=xorNum&(orNum^1023)
    elif operation == '&':
        andNum=andNum&num
        orNum=orNum&num
        xorNum=xorNum&num
    else:
        # Flip all ones to zeroes and flip untouched
        # All bits that were set to 1 in OR mask and 1 in num, should be set to 0 in AND mask
        # All bits that were set to 0 in AND mask and 1 in num, should be set to 1 in OR mask
        # All those bits that were not set to 0 in AND mask and not set to 1 in OR mask should be set to 1 in xor MASK
        oldAndNum=andNum
        oldOrNum=orNum
        andNum=andNum^((orNum|(andNum^1023))&num)
        orNum=orNum^(((oldAndNum^1023)|(orNum))&num)
        xorNum=xorNum^(oldAndNum&(oldOrNum^1023)&num)

# OR
print(3)
print('& '+str(andNum))
print('| '+str(orNum))
print('^ '+str(xorNum))





import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
# input = io.StringIO(os.read(0, os.fstat(0).st_size).decode()).readline
ii=lambda:int(input())
kk=lambda:map(int, input().split())
ll=lambda:list(kk())


# xor + 0 --> unchanged(2)
# xor + 1 --> flip(3)
# or + 0 --> unchanged(2)
# or + 1 --> 1(1)
# and + 0 --> 0(0)
# and + 1 --> unchanged(2)
arr = [2]*10
for _ in range(ii()):
	s,v=input().split()
	v = int(v)
	if s == b"|":
		for i in range(10):
			if v&(2**i):
				arr[i]= 1
	elif s == b"^":
		for i in range(10):
			if v&(2**i):
				arr[i]^=1
	elif s == b"&":
		for i in range(10):
			if not (v&(2**i)):
				arr[i]=0
	else:
	    print(s)
print(3)
x=o=a= 0
for i in range(10):
	if arr[i]==3: x += 2**i
	elif arr[i]==0: a+=2**i
	elif arr[i]==1:o+=2**i
print('|',o)
print('^',x)
print('&',2**10 - a - 1)

from sys import stdin, stdout

n = int(stdin.readline())
a = list()
y = 0

for i in range(n):
    oper, x = stdin.readline().split()
    x = int(x)
    a.append((oper, x))
    if oper == '&':
        y &= x
    elif oper == '|':
        y |= x
    elif oper == '^':
        y ^= x

AND = (1<<10) - 1
OR = 0
XOR = 0

for k in range(10):
    cur = 1 << k
    for comm in a:
        oper, x = comm
        if oper == '&':
            cur &= x
        elif oper == '|':
            cur |= x
        elif oper == '^':
            cur ^= x
    res0 = y & (1<<k)
    res1 = cur & (1<<k)
    if not res0 and not res1:
        AND ^= (1<<k)
    elif not res0 and res1:
        pass
    elif res0 and not res1:
        XOR ^= (1<<k)
    else:
        OR ^= (1<<k)

print(3)
print('& ', AND)
print('| ', OR)
print('^ ', XOR)




from sys import stdin, stdout
from operator import __or__, __and__, __xor__

oper = {'&': __and__, '|': __or__, '^': __xor__}
n = int(stdin.readline())
a = 0
b = (1<<10) - 1

for i in range(n):
    op, x = stdin.readline().split()
    x = int(x)
    a = oper[op](a, x)
    b = oper[op](b, x)

AND = (1<<10) - 1
OR = 0
XOR = 0

for k in range(10):
    res0 = a & (1<<k)
    res1 = b & (1<<k)
    if not res0 and not res1:
        AND ^= (1<<k)
    elif not res0 and res1:
        pass
    elif res0 and not res1:
        XOR ^= (1<<k)
    else:
        OR ^= (1<<k)

print(3)
print('& ', AND)
print('| ', OR)
print('^ ', XOR)




import sys
input = sys.stdin.readline

n = int(input())
com = []

for _ in range(n):
    l = input().split()
    com.append((l[0], int(l[1])))

AND, OR, XOR = [], [], []

for i in range(10):
    res1 = 0
    res2 = 1
    
    for s, n in com:
        b = (n>>i)&1
        
        if s=='&':
            res1 &= b
            res2 &= b
        elif s=='|':
            res1 |= b
            res2 |= b
        elif s=='^':
            res1 ^= b
            res2 ^= b
        
    if (res1, res2)==(0, 0):
        AND.append(i)
    elif (res1, res2)==(1, 1):
        OR.append(i)
    elif (res1, res2)==(1, 0):
        XOR.append(i)

AND_n = 0

for i in range(10):
    if i not in AND:
        AND_n += 2**i

OR_n = 0

for i in OR:
    OR_n += 2**i

XOR_n = 0

for i in XOR:
    XOR_n += 2**i

print(3)
print('&', AND_n)
print('|', OR_n)
print('^', XOR_n)

"""
for i in range(1024):
    res1 = i
    
    for s, n in com:
        if s=='&':
            res1 &= n
        elif s=='|':
            res1 |= n
        elif s=='^':
            res1 ^= n
    
    res2 = i
    res2 &= AND_n
    res2 |= OR_n
    res2 ^= XOR_n
    
    if res1!=res2:
        1/0
"""

import sys
input=sys.stdin.readline
import copy
from math import *
n=int(input())
a=[-1 for i in range(10)]
for i in range(n):
    p,q=input().split()
    qq=(bin(int(q))[2:])
    q=list((10-len(qq))*"0"+qq)
    if p=='|':
        for i in range(9,-1,-1):
            if  q[i]=='1':
                a[i]=1
    if p=='&':
        for i in range(9,-1,-1):
            if  q[i]=='0':
                a[i]=0
    if p=='^':
        for i in range(9,-1,-1):
            if  q[i]=='1' and (a[i]==0 or a[i]==1):
                a[i]^=1
            elif q[i]=='1' :
                if a[i]==-1:
                    a[i]=-2
                else:
                    a[i]=-1
    #print(a)                
c=0
for i in range(10):
    if a[i]==-2:
        c+=(2**(10-i-1))
print(3)
print("^",c)
v=list("0"*10)
for i in range(10):
    if a[i]==1:
        v[i]='1'
print("|",int("".join(v),2))  
u=list("1"*10)
for i in range(10):
    if a[i]==0:
        u[i]='0'
print("&",int("".join(u),2))  

n = int(input())
queries = list(input().split() for _ in range(n))

a, b = 0, (1<<10) - 1
for c, x in queries:
    x = int(x)
    if c == '|':
        a, b = a | x, b | x
    elif c == '&':
        a, b = a & x, b & x
    elif c == '^':
        a, b = a ^ x, b ^ x

x, y, z = 0, (1<<10) - 1, 0
for i in range(10):
    a_i = (a >> i) & 1
    b_i = (b >> i) & 1
    if a_i and b_i:
        x |= (1 << i)
    if not a_i and not b_i:
        y ^= (1 << i)
    if a_i and not b_i:
        z ^= (1 << i)

print(3)
print('|', x)
print('&', y)
print('^', z)


from sys import *
d = {'|': lambda t: t | k, '&': lambda t: t & k, '^': lambda t: t ^ k}
 
a, b = 1023, 0
for i in range(int(input())):
    s, q = stdin.readline().split()
    k = int(q)
    a = d[s](a)
    b = d[s](b)
 
t = [2]
for u in range(1024):
    for v in range(1024):
        if 1023 ^ v == a and u ^ v == b:
            print('2\n|', u, '\n^', v)
            return

import os
import sys
from io import BytesIO, IOBase
 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
######################################
a=int(input())
bits=['r' for i in range(10)]
temp=['r' for i in range(10)]
for i in range(a):
    x,y=input().split()
    y=int(y)
    n=bin(y)
    n=n[2:]
    ans=''
    for i in range(10-len(n)):
        ans+='0'
    ans=ans+n
    
    if(x=='|'):
        
        for i in range(len(bits)):
            if(ans[i]=='1'):
                temp[i]='1'
            
    if(x=='&'):
        for i in range(len(bits)):
            if(ans[i]=='0'):
                temp[i]='0'
    if(x=='^'):
        for i in range(len(bits)):
            if((temp[i]=='0' and ans[i]=='1') or (temp[i]=='1' and ans[i]=='0')):
                temp[i]='1'
            elif(temp[i]==ans[i] and (temp[i]=='0' or temp[i]=='1')):
                temp[i]='0'
            else:
                if(ans[i]=='1'):
                    if(temp[i]=='r'):
                        temp[i]='rb'
                    else:
                        temp[i]='r'


ad=['0' for i in range(10)]
xor=['0' for i in range(10)]
nd=['1' for i in range(10)]

for i in range(len(temp)):
    if(temp[i]=='1'):
        ad[i]='1'
        nd[i]='1'
        xor[i]='0'
    elif(temp[i]=='0'):
        nd[i]='0'
        ad[i]='0'
        xor[i]='1'
    elif(temp[i]=='rb'):
        xor[i]='1'
        ad[i]='0'
        nd[i]='1'
    else:
        xor[i]='0'
        ad[i]='0'
        nd[i]='1'

ad=int(''.join(map(str,ad)),2)
nd=int(''.join(map(str,nd)),2)
xor=int(''.join(map(str,xor)),2)
print(3)
print('^',xor)
print('&',nd)
print('|',ad)
                
        
            
            
            
        
    



#!/usr/bin/env pypy3

from sys import stdin, stdout
 
def input():
    return stdin.readline().strip()

def run_program(n, program):
    for op, a in program:
        assert(op in "&|^")
        if op == '&': n = n & a
        if op == '|': n = n | a
        if op == '^': n = n ^ a
    return n

N = int(input())

q = 1023
r = 0

original_program = []
for _ in range(N):
    op, s = input().split(' ')
    s = int(s)

    original_program += [(op, s)]

    if op == '&':
        q = q & s
        r = r & s
    elif op == '^':
        r = r ^ s
    elif op == '|':
        q, r = (q ^ (q&s)), (r ^ s ^ (r&s))
    else:
        assert(False)

final_program = [('&', q), ('^', r)]

print(2)
print(f"& {q}")
print(f"^ {r}")

import sys
n = int(sys.stdin.readline())
zero_model, one_model = 0, (1<<10)-1
commands = []
for i in range(n):
	c, k = sys.stdin.readline()[:-1].split()
	k = int(k)
	commands.append((c,k))

def process(n,commands):
	for comm in commands:
		c, k = comm
		if c=='|':
			n |= k
		elif c=='^':
			n ^= k
		elif c=='&':
			n &= k
	return n

zero_model = process(0,commands)
one_model = process((1<<10)-1,commands)

set_zero = (1<<10)-1
flip = 0
set_one = 0
for i in range(10):
	bz = zero_model&(1<<i)
	bo = one_model&(1<<i)
	if bz >= 1 and bo==0:
		flip |= 1<<i
	elif bz >= 1 and bo >= 1:
		set_one |= 1<<i
	elif bz==0 and bo==0:
		set_zero &= ~(1<<i)
ans = [("&",set_zero),("^",flip),("|",set_one)]

print(len(ans))
for comm in ans:
	print(*comm)

# for i in range(1<<10):
# 	if process(i,commands) != process(i,ans):
# 		print(bin(process(i,commands)),"vs",bin(process(i,ans)))