Problem:
 Score: 100 points    Problem Statement  Takahashi is solving quizzes. He has easily solved all but the last one.  The last quiz has three choices: 1 , 2 , and 3 .  With his supernatural power, Takahashi has found out that the choices A and B are both wrong.  Print the correct choice for this problem.      Constraints   Each of the numbers A and B is 1 , 2 , or 3 .  A and B are different.         Input  Input is given from Standard Input in the following format:  A  B       Output  Print the correct choice.        Sample Input 1 3
1      Sample Output 1 2  When we know 3 and 1 are both wrong, the correct choice is 2 .       Sample Input 2 1
2      Sample Output 2 3

Solution (Python):
A = int(input())
B = int(input())

if A != 1 and B != 1:
  print(1)
elif A != 2 and B != 2:
  print(2)
else:
  print(3)

Solution (Python):
A = int(input())
B = int(input())

print(6-A-B)

Solution (Python):
A = input()
B = input()

if '1' != A and '1' != B:
    print(1)
elif '2' != A and '2' != B:
    print(2)
else:
    print(3)

Solution (Python):
a = int(input())
b = int(input())
print(6 - a - b)

Solution (Python):
A = int(input())
B = int(input())
cand = [1,2,3]
cand.remove(A)
cand.remove(B)
print(cand[0])

Solution (Python):
l = [1,2,3]
for i in range(2):
    a = int(input())
    l.remove(a)
print(l[0])

Solution (Python):
A=int(input())
B=int(input())
for i in range(1,4):
  if i!=A and i!=B:
    print(i)

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
A = int(input())
B = int(input())
C = A + B
if C==3:
	print(3)
elif C==4:
	print(2)
else:
	print(1)

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    A, B = int(input()), int(input())
    choice = [1, 2, 3]
    choice.remove(A)
    choice.remove(B)
    print(choice[0])


if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())

print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())

List = [1, 2, 3]
List.remove(a)
List.remove(b)
print(*List)

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())
ans = {1, 2, 3}
print(list(ans - {a, b})[0])

Solution (Python):
a = int(input())
b = int(input())
print(6 - a - b)

Solution (Python):
a=int(input())
b=int(input())
if(a+b==3):
  print("3")
elif(a+b==4):
  print("2")
else:
  print("1")

Solution (Python):
A = int(input())
B = int(input())

for ans in [1, 2, 3]:
	if A == ans or B == ans:
		continue
	print(ans)

Solution (Python):
a,b = [int(input()) for i in range(2)]
ans_list = [1,2,3]
ans_list.remove(a)
ans_list.remove(b)
print(ans_list[0])

Solution (Python):
a = int(input())
b = int(input())

if a != 1 and b != 1:
    print(1)
elif a != 2 and b != 2:
    print(2)
elif a != 3 and b != 3:
    print(3)

Solution (Python):
A=int(input())
B=int(input())

if A*B==2:
    print(3)
elif A*B==3:
    print(2)
else:
    print(1)

Solution (Python):
l=[1,2,3]
a=int(input())
b=int(input())
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Solution (Python):
A = int(input())
B = int(input())
if (A == 1and B == 2) or  (A == 2 and B == 1):
    print(3)
elif (A == 1 and B == 3) or (A == 3 and B == 1):
     print(2)
elif (A == 2 and B == 3) or (A == 3 and B == 2):
    print(1)

Solution (Python):


a = int(input())
b = int(input())

if a == 1:
    if b == 2:
        print(3)
    elif b == 3:
        print(2)
elif a == 2:
    if b == 1:
        print(3)
    elif b == 3:
        print(1)
elif a == 3:
    if b == 1:
        print(2)
    elif b == 2:
        print(1)

Solution (Python):
def main():
    answers = {1, 2, 3}
    A = {int(input())}
    B = {int(input())}

    answers.difference_update(A)
    answers.difference_update(B)
    for v in answers:
        print(v)
    
if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())
lst = [1,2,3]
lst.remove(A)
lst.remove(B)
print(lst[0])

Solution (Python):
s = {1, 2, 3}
a = int(input())
s.discard(a)
b = int(input())
s.discard(b)
print(s.pop())

Solution (Python):
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


answer = set("1 2 3".split())
a = fetch_one_line()
b = fetch_one_line()

print(list(answer - set(a) - set(b))[0])

Solution (Python):
a = int(input())
b = int(input())


if a + b == 3 :
	print(3)
elif a + b == 4 :
	print(2)
else :
	print(1)

Solution (Python):
a = int(input())
b = int(input())
tl = [a,b]
t = a * b
if t == 3:
    print(2)
elif t == 6:
    print(1)
elif t == 2:
    print(3)

Solution (Python):
a = int(input())
b = int(input())

l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Solution (Python):
a = int(input())
b = int(input())

if a == 1:
    if b == 2:
        c = 3
    else:
        c = 2
elif a == 2:
    if b == 1:
        c = 3
    else:
        c = 1
else:
    if b == 1:
        c = 2
    else:
        c = 1
print(c)

Solution (Python):
a = int(input())
b = int(input())

batsu = [a, b]
batsu.sort()

if batsu == [1, 2]:
    print(3)
elif batsu == [1, 3]:
    print(2)
else:
    print(1)

Solution (Python):
n=int(input())
m=int(input())
print(6-n-m)

Solution (Python):
S=int(input())
W=int(input())
if S+W==3:
  print(3)
elif S+W==4:
  print(2)
elif S+W==5:
  print(1)

Solution (Python):
A = int(input())
B = int(input())
Ans = 6

Ans = Ans - A - B

print(Ans)

Solution (Python):
A = int(input())
B = int(input())
if A == 1 and B == 2:
    print(3)
elif A == 1 and B == 3:
    print(2)
elif A == 2 and B == 1:
    print(3)
elif A == 2 and B == 3:
    print(1)
elif A == 3 and B == 1:
    print(2)
elif A == 3 and B == 2:
    print(1)

Solution (Python):


array = [1, 2, 3]
input1 = int(input())
input2 = int(input())
array.remove(input1)
array.remove(input2)
print(array[0])

Solution (Python):
a = input()
b = input()

p = set()
p.add("1")
p.add("2")
p.add("3")

p.remove(a)
p.remove(b)

print(p.pop())

Solution (Python):
A = int(input())
B = int(input())

if A ==1 and B==2:
    print(3)
elif A==1 and B==3:
    print(2)
elif A==2 and B ==1:
    print(3)
elif A==2 and B==3:
    print(1)
elif A==3 and B==1:
    print(2)
else:
    print(1)

Solution (Python):
A=int(input())
B=int(input())
lab=[A,B]
for i in range(3):
    if not i+1 in lab:
        print(i+1)
        break

Solution (Python):
answers = [1,2,3]

a = int(input())
b = int(input())

answers.remove(a)
answers.remove(b)

print(answers[0])

Solution (Python):
a = int(input())
b = int(input())

ans = [1,2,3]

if a in ans:
    ans.remove(a)
if b in ans:
    ans.remove(b)
print(ans[0])

Solution (Python):
c = ['1', '2', '3']
a = input()
b = input()
c.remove(a)
c.remove(b)
print(c[0])

Solution (Python):
a = int(input())
b = int(input())

num_list = [1,2,3]

num_list.remove(a)
num_list.remove(b)

answer = num_list[0]
print(answer)

Solution (Python):
a = int(input())
b = int(input())
c = [1,2,3]
r = [i for i in c if not(i==a) and not(i==b)]
print(r[0])

Solution (Python):
import sys

a = int(input())
b = int(input())

numbers = [1, 2, 3]

for i in numbers:
  if i != a and i != b:
    print(i)
    sys.exit()

Solution (Python):
ans = {1,2,3}
A = int(input().strip())
B = int(input().strip())
ans = ans - {A,B}
print(ans.pop())

Solution (Python):
a = int(input())
s = int(input())

if a+s == 3:
  print(3)
elif a+s == 5:
  print(1)
elif a+s == 4:
  print(2)

Solution (Python):


a=int(input())
b=int(input())

ans = [1,2,3]
ans.remove(a)
ans.remove(b)

print(ans[0])

Solution (Python):
a = int(input())
b = int(input())

ko = [1,2,3]
for i in range(3):
    if ko[i] != a and ko[i] != b:
        print(ko[i])

Solution (Python):
g=int(input())
k=int(input())
c=g+k
print(6-c)

Solution (Python):
a = int(input())
b = int(input())

c = [1, 2, 3]

result = [i for i in c if i != a and i != b]

print(result[0])

Solution (Python):
A = input()
B = input()
cond_ans = ["1","2","3"]
ans = set(cond_ans) - set([A,B])
print(list(ans)[0])

Solution (Python):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
A = int(input())
B = int(input())

lst = [A, B]
lst.sort()

for i in range(1,4):
    if not i in lst:print(i)

Solution (Python):
a = int(input())
b = int(input())
tmp = [1,2,3]

tmp.remove(a)
tmp.remove(b)
print(tmp[0])

Solution (Python):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue


Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): 
    A = int(input())
    B = int(input())
    L = [1,2,3]
    for i in L:
        if i != A and i != B:
            print(i)


if __name__ == "__main__":
    main()

Solution (Python):
l=[]
l.append(int(input()))
l.append(int(input()))
for i in range(1,4):
    if i not in l:
        print(i)
        break

Solution (Python):
a = int(input())
b = int(input())
print(6 - a - b)

Solution (Python):
def q1(a,b):
    tmplist = [1,2,3]
    del tmplist[tmplist.index(a)]
    del tmplist[tmplist.index(b)]
    return tmplist[0]

print(q1(int(input()),int(input())))

Solution (Python):
import sys

def solve(a, b):
    for ans in [1, 2, 3]:
        if ans != a and ans != b:
            print(ans)
            break


if __name__ == '__main__':
    a = int(sys.stdin.readline().strip())
    b = int(sys.stdin.readline().strip())
    solve(a, b)

Solution (Python):
A = int(input())
B = int(input())

if(A != 1  and B != 1):
    print(1)
if(A != 2  and B != 2):
    print(2)
if(A != 3  and B != 3):
    print(3)

Solution (Python):
a=int(input())
b=int(input())
c=[1,1,1]
c[a-1]=0
c[b-1]=0

print(c.index(1)+1)

Solution (Python):
m=int(input())
n=int(input())

if m==1 and n==2:
    print(3)
elif m==1 and n==3:
    print(2)
elif m==2 and n==1:
    print(3)
elif m==3 and n==1:
    print(2)
elif m==2 and n==3:
    print(1)
else:
    print(1)

Solution (Python):
from __future__ import print_function

import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return















































def main():
    a = int(input().strip())
    b = int(input().strip())
    s=set([1,2,3])
    s.remove(a)
    s.remove(b)
    for x in s:
        print(x)
        return
if __name__ == '__main__':
    main()

Solution (Python):
nums = [1,2,3]

a = int(input().strip())
b = int(input().strip())
nums.remove(a)
nums.remove(b)

print(nums[0])

Solution (Python):
A = int(input())
B = int(input())
X =[1,2,3]
X.remove(A)
X.remove(B)
print(X[0])

Solution (Python):
A=int(input())
B=int(input())

print(6-A-B)

Solution (Python):
a = int(input())
b = int(input())

ary = [False] * 3

ary[a-1] = True
ary[b-1] = True

for i in range(3):
  if ary[i]:
    continue
  print(i+1)
  break

Solution (Python):
a = int(input())
b = int(input())
s = [1, 2, 3]
s.remove(a)
s.remove(b)
print(s[0])

Solution (Python):
A = int(input())
B = int(input())

ls = [1,2,3]

del ls[ls.index(A)]
del ls[ls.index(B)]

print(ls[0])

Solution (Python):
A = input()
B = input()

answer = '123'
answer = answer.replace(A[0], '')
answer = answer.replace(B[0], '')

print(answer)

Solution (Python):
a=int(input())
b=int(input())
if a==1 and b==2:
  print(3)
elif a==2 and b==1:
  print(3)
elif a==3 and b==1:
  print(2)
elif a==3 and b==2:
  print(1)
elif a==1 and b==3:
  print(2)
elif a==2 and b==3:
  print(1)

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()

input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True


ans=0

a=I()
b=I()
ans=[1,2,3]
ans.remove(a)
ans.remove(b)

print(*ans)

Solution (Python):
a = int(input())
b = int(input())
l = [1,2,3]

for n in l:
  if n != a and n != b:
	  print(n)

Solution (Python):


A=int(input())
B=int(input())

if A==1:
    if B==2:
        print(str(3))
    elif B==3:
        print(str(2))
        
elif A==2:
    if B==1:
        print(str(3))
    elif B==3:
        print(str(1))

else:
    if B==1:
        print(str(2))
    elif B==2:
        print(str(1))

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
a=ni()
b=ni()

ans=[1,1,1]

ans[a-1]=0
ans[b-1]=0

for i,aa in enumerate(ans):
    if aa==1:
        print(i+1)

Solution (Python):
a = int(input())
b = int(input())
if a + b == 3:
    print("3")
elif a + b == 4:
    print("2")
else:
    print("1")

Solution (Python):
A = int(input())
B = int(input())
arr = [1, 2, 3]

arr.remove(A)
arr.remove(B)

print(arr[0])

Solution (Python):
a = int(input())
b = int(input())
goukei = a + b
if goukei == 3:
    print(3)

if goukei == 4:
    print(2)

if goukei == 5:
    print(1)

Solution (Python):


a = int(input())
b = int(input())
c=6-(a+b)
print (c)

Solution (Python):
A = int(input())
B = int(input())
if A==1 and B==2:
  print(3)
elif A==2 and B==1:
  print(3)
elif A==2 and B==3:
  print(1)
elif A==3 and B==2:
  print(1)
else:
  print(2)

Solution (Python):
a = int(input())
b = int(input())

l = ['1','2','3']

l.remove(str(a))
l.remove(str(b))

print(l.pop(0))

Solution (Python):
A=int(input())
B=int(input())

if A==1:
    if B==2:
        print(3)
    else:
        print(2)
elif A==2:
    if B==1:
        print(3)
    else:
        print(1)
elif A==3:
    if B==1:
        print(2)
    else:
        print(1)

Solution (Python):
A = int(input())
B = int(input())

if A != 1 and B != 1 :
  print("1")
elif A != 2 and B != 2 :
  print("2")
else:
  print("3")

Solution (Python):
a = int(input())
b = int(input())

if (a == 1 and b == 2) or (a == 2 and b == 1):
    print(3)
elif (a == 2 and b == 3) or (a == 3 and b == 2):
    print(1)
elif (a == 3 and b == 1) or (a == 1 and b == 3):
    print(2)

Solution (Python):
a = [int(input()) for i in range(2)]
print(6-a[0]-a[1])

Solution (Python):
A = int(input())
B = int(input())

ans = set([1, 2, 3]) - set([A, B])
print(ans.pop())

Solution (Python):
a = int(input())
b = int(input())
ans = [1, 2, 3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Solution (Python):
a=int(input())
b=int(input())

for i in range(3):
    if((i+1 != a) and (i+1 != b)):
        c = i+1
    
print(c)

Solution (Python):
a = int(input())
b = int(input())
li = [1,2,3]
for i in li:
  if i == a:
    continue
  if i == b:
    continue
  else:
    print(i)

Solution (Python):

a = int(input())
b = int(input())

li = set([1,2,3])

ans = li - set([a,b])



print(list(ans)[0])

Solution (Python):
a = int(input())
b = int(input())
if a == 1:
    if b == 2:
        print(3)
    elif b == 3:
        print(2)
elif a == 2:
    if b == 1:
        print(3)
    elif b == 3:
        print(1)
else:
    if b == 1:
        print(2)
    elif b == 2:
        print(1)

Solution (Python):
a=int(input())
b=int(input())
ans=[1,2,3]
ans.remove(a)
ans.remove(b)
print(ans[0])

Solution (Python):
a = int(input())
b = int(input())
if a == 1 and b == 2:
    print(3)
    exit()
if a == 2 and b == 1:
    print(3)
    exit()
if a == 1 and b == 3:
    print(2)
    exit()
if a == 3 and b == 1:
    print(2)
    exit()
if a == 2 and b == 3:
    print(1)
    exit()
if a == 3 and b == 2:
    print(1)
    exit()

Solution (Python):
A = int(input())
B = int(input())
def superpower(A,B):
    if A != 1 and B != 1:
        return 1
    elif A != 2 and B != 2:
        return 2
    else:
        return 3
print(superpower(A,B))

Solution (Python):
A = int(input())
B = int(input())
s = set()
s.add(A)
s.add(B)
for i in (1,2,3):
    if i not in s:
        print(i)
        exit()

Solution (Python):
A = int(input())
B = int(input())
ans = 6-A-B
print(ans)

Solution (Python):
a = int(input())
b = int(input())

print(min((set([1, 2, 3]) - set([a, b]))))

Solution (Python):
a=int(input())
b=int(input())
x=[1,2,3]
x[x.index(a)]=0
x[x.index(b)]=0
print(sum(x))

Solution (Python):
A = int(input())
B = int(input())
if A == 1:
  if B == 2:
    print(3)
  else:
    print(2)
elif A == 2:
  if B == 1:
    print(3)
  else:
    print(1)
else:
  if B == 1:
    print(2)
  else:
    print(1)

Solution (Python):
A = int(input())
B = int(input())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Solution (Python):
a = int(input())
b = int(input())

c = a + b

if c == 4:
    print(2)
elif c == 5:
    print(1)
else:
    print(3)

Solution (Python):
s = input().split()
a=int(s[0])
s = input().split()
b = int(s[0])
print(6-a-b)

Solution (Python):
a = int(input())
b = int(input())

c = 6 - a - b
print(str(c))

Solution (Python):
A=set()
A.add(int(input()))
A.add(int(input()))
if 1 not in A:
    print(1)
elif 2 not in A:
    print(2) 
else:
    print(3)

Solution (Python):
A=int(input())
B=int(input())
S=[1,2,3]

S.remove(A)
S.remove(B)
print(S[0])

Solution (Python):
def main():
    a=int(input())
    b=int(input())
    l=[1,2,3]
    l.remove(a)
    l.remove(b)
    print(l[0])


main()

Solution (Python):
a = int(input())
b = int(input())

list = []
list.append(a)
list.append(b)

if 1 in list and 2 in list:
    print(3)
elif 1 in list and 3 in list:
    print(2)
elif 2 in list and 3 in list:
    print(1)

Solution (Python):
A=int(input())
B=int(input())

R=[1,1,1]
R[A-1]=0
R[B-1]=0

if R[0]==1:
  print(1)
elif R[1]==1:
  print(2)
else:
  print(3)

Solution (Python):
A = int(input())
B = int(input())
ans = {1,2,3}
ans.remove(A)
ans.remove(B)
print(*ans)

Solution (Python):
a = int(input())
b = int(input())

ans = [1, 2, 3]
ans.remove(a)
ans.remove(b)

print(ans[0])

Solution (Python):

import sys


def solve(A: int, B: int):
    print(6-A-B)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
a = int(input())
b = int(input())
c = [a, b]
if 1 not in c:
  print(1)
elif 2 not in c:
  print(2)
else:
  print(3)

Solution (Python):

import numpy as np

a = int(input())
b = int(input())

if a != 1 and b != 1:
    ans = 1
elif a != 2 and b != 2:
    ans = 2
elif a != 3 and b != 3:
    ans = 3

print(ans)

Solution (Python):
import math

a, b = [int(input()) for i in range(2)]
if (a == 1 and b == 2) or (a == 2 and b == 1):
    print(3)
elif (a == 2 and b == 3) or (a == 3 and b == 2):
    print(1)
else:
    print(2)

Solution (Python):
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

a=INT()
b =INT()
if a+b ==3:
    print(3)
elif a+b==4:
    print(2)
else:
    print(1)

Solution (Python):
A = int(input())
B = int(input())

if A < 3 and B < 3:
    print(3)
else:
    print(abs(A-B))

Solution (Python):
A = int(input())
B = int(input())
s = ([1,2,3])

s.remove(A)
s.remove(B)

print(s[0])

Solution (Python):
n=[1,2,3]
a=int(input())
b=int(input())
n.remove(a)
n.remove(b)
print(n[0])

Solution (Python):
a=int(input())
b=int(input())

if a == 1 and b == 2:
  print(3)
if a == 1 and b == 3:
  print(2)
if a == 2 and b == 3:
  print(1)
if a == 2 and b == 1:
  print(3)
if a == 3 and b == 2:
  print(1)
if a == 3 and b == 1:
  print(2)

Solution (Python):
input_data1 = int(input())
input_data2 = int(input())

answer = [1, 2, 3]
result = 0

for miss in answer:
    if(miss == input_data1 or miss == input_data2):
        pass
    else:
        result = miss

print(result)

Solution (Python):
a=input()
b=input()
anc = ['1','2','3']

anc.remove(a)
anc.remove(b)
print(anc[0])

Solution (Python):
def main():
    ab = [int(input()) for _ in range(2)]
    if not 1 in ab:
        return 1
    if not 2 in ab:
        return 2
    else:
        return 3


print(main())

Solution (Python):
abc = [1,2,3]
a = int(input())
b = int(input())
for i in abc:
    if i != a and i != b:
        print(i)

Solution (Python):
A=int(input())
B=int(input())
l=[0]*2
l[0]=A
l[1]=B
if 3 not in l:
    print(3)
elif 2 not in l:
    print(2)
else:
    print(1)

Solution (Python):
l = [1, 2, 3]
A = int(input())
B = int(input())
l.remove(A)
l.remove(B)
print(l.pop(0))

Solution (Python):


A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
a = int(input())
b = int(input())

s = 6-a-b
print(s)

Solution (Python):
A = input()
B = input()
if int(A)*int(B) == 2:
  print(3)
elif int(A)*int(B) == 3:
  print(2)
else:
  print(1)

Solution (Python):
a = int(input())
b = int(input())

v = [0]*4
v[a] = 1
v[b] = 1
for i in range(1, 4):
	if v[i] == 0:
		print(i)

Solution (Python):
A = int(input())
B = int(input())

if A == 1 and B == 2:
    print(3)

if A == 1 and B == 3:
    print(2)

if A == 2 and B == 1:
    print(3)

if A == 2 and B == 3:
    print(1)

if A == 3 and B == 1:
    print(2)

if A == 3 and B == 2:
    print(1)

Solution (Python):
A = int(input())
B = int(input())

kotae = [1,2,3]
kotae.remove(A)
kotae.remove(B)

print(kotae[0])

Solution (Python):
A = int(input())
B = int(input())
for i in range(3):
    if (A != i+1 and B != i+1):
        print(i+1)

Solution (Python):
a=input()
b=input()
anc = ['1','2','3']

anc.remove(a)
anc.remove(b)
print(anc[0])

Solution (Python):
a, b = int(input()), int(input())
if a==1:
    if b==2: print(3)
    else: print(2)
elif a==2:
    if b==1: print(3)
    else: print(1)
else:
    if b==1: print(2)
    else: print(1)

Solution (Python):
A = int(input())
B = int(input())
ls = [1, 2, 3]
ls[A - 1] = 0
ls[B - 1] = 0
for i in ls:
	if i != 0:
		print(i)

Solution (Python):
a, b = [int(input()) for i in range(2)]

if a == 1 and b == 2:
    print(3)
elif a == 2 and b == 1:
    print(3)
elif a == 2 and b == 3:
    print(1)
elif a == 3 and b == 2:
    print(1)
elif a == 1 and b == 3:
    print(2)
elif a == 3 and b == 1:
    print(2)

Solution (Python):
a = [int(input()) for i in range(2)]

if 1 not in a :
    print(1)
elif 2 not in a:
    print(2)
else:
    print(3)

Solution (Python):


A = int(input())
B = int(input())

ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)

print(ans[0])

Solution (Python):
A = int(input())
B = int(input())

for i in range(1,4):
  if i != A and i != B:
    print(i)

Solution (Python):
a = int(input())
b = int(input())

print(6-a-b)

Solution (Python):
data1 = int(input())
data2 = int(input())
if (data1 == 1 and data2 == 2) or (data1 == 2 and data2 == 1):
    print(3)
elif (data1 == 1 and data2 == 3) or (data1 == 3 and data2 == 1):
    print(2)
elif (data1 == 2 and data2 == 3) or (data1 == 3 and data2 == 2):
    print(1)

Solution (Python):
A = int(input())
B = int(input())

li = [1, 2, 3]

li.remove(A)
li.remove(B)

print(li[0])

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	A = []
	for _ in range(2):
		A.append(INT())
	
	

	ans = [1, 2, 3]
	for a in A:
		if a in ans:
			ans.remove(a)
	
	print(ans[0])

if __name__ == '__main__':
	main()

Solution (Python):
from sys import stdin


def main():
    AB = [int(stdin.readline().rstrip()) for _ in range(2)]
    for i in range(1, 4):
        if i not in AB:
            print(i)
            break


if __name__ == "__main__":
    main()

Solution (Python):
a = int(input())
b = int(input())
x = (a,b)
if x == (1,2) or x == (2,1):
    print(3)
elif x == (2,3) or x == (3,2):
    print(1)
else:
    print(2)

Solution (Python):
print(int(input()) ^ int(input()))

Solution (Python):
a = int(input())
b = int(input())

print(6-a-b)

Solution (Python):
a=int(input())
b=int(input())
for i in range(1,4):
  if i == a:
    continue
  elif i == b:
    continue
  else:
    print(i)
    break

Solution (Python):
A = int(input())
B = int(input())

print(6-A-B)

Solution (Python):
A = int(input())
B = int(input())
A_B = {A, B}

ans = {1, 2, 3}
a = ans - set([A, B])

print(list(a)[0])

Solution (Python):
a=int(input())
b=int(input())
if a == 1 and b ==2:
  print(3)
if a == 2 and b ==1:
  print(3)
if a == 1 and b ==3:
  print(2)
if a == 3 and b ==1:
  print(2)
if a == 2 and b ==3:
  print(1)
if a == 3 and b ==2:
  print(1)

Solution (Python):
A = int(input())
B = int(input())
num = A + B
if num == 3:
  print(3)
elif num == 4:
  print(2)
else:
  print(1)

Solution (Python):
a=input()
b=input()
print(6-int(a)-int(b))

Solution (Python):
a = int(input())
b = int(input())
c = a * b

if c == 2:
    print(3)
elif c == 6:
    print(1)
else:
    print(2)

Solution (Python):
ans = ['1', '2', '3']
ans.remove(input())
ans.remove(input())
print(ans[0])

Solution (Python):


a = int(input())
b = int(input())

targets = [a, b]
if 1 in targets:
    pass
else:
    print(1)
if 2 in targets:
    pass
else:
    print(2)
if 3 in targets:
    pass
else:
    print(3)

Solution (Python):
import sys
input = sys.stdin.readline


a=int(input())

b=int(input())

l=[]
l.append(a)
l.append(b)

d=[1,2,3]

d.remove(a)
d.remove(b)

print(d[0])

Solution (Python):
def main():
    A = int(input())
    B = int(input())

    if A == 1 and B == 2:
        print(3)
    elif A == 1 and B == 3:
        print(2)
    elif A == 2 and B == 1:
        print(3)
    elif A == 2 and B == 3:
        print(1)
    elif A == 3 and B == 1:
        print(2)
    elif A == 3 and B == 2:
        print(1)


if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())
if (A == 1 and B == 2) or ( A == 2 and B == 1):
    print(3)
elif ( A == 2 and B == 3) or (A ==3 and B == 2):
    print(1)
elif ( A == 1 and B == 3) or (A ==3 and B == 1):
    print(2)

Solution (Python):
A=int(input())
B=int(input())
lis = [A,B]
for i in range(1,4):
    if not i in lis:
        print(i)

Solution (Python):
a = int(input())
b = int(input())

l = [i for i in range(1, 4)]

for i in l:
    if a != i and b != i:
        print(i)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A = int(input())
    B = int(input())
    ans = {A, B} ^ {1, 2, 3}
    print(*ans)


main()

Solution (Python):
A=int(input())
B=int(input())
C=6

ans=C-(A+B)
print(ans)

Solution (Python):
A = int(input())
B = int(input())
if (A == 1 and B == 2) or (B == 1 and A == 2):
    print(3)
elif (A == 1 and B == 3) or (B == 1 and A == 3):
    print(2)
elif (A == 2 and B == 3) or (B == 2 and A == 3):
    print(1)

Solution (Python):
a = int(input())
b = int(input())
arr = [1,2,3]
arr.remove(a)
arr.remove(b)
print(arr[0])

Solution (Python):
a=int(input())
b=int(input())
if a==1:
    if b==2:
        print(3)
    if b==3:
        print(2)
if a==2:
    if b==1:
        print(3)
    if b==3:
        print(1)
if a==3:
    if b==1:
        print(2)
    if b==2:
        print(1)

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    A = INT()
    B = INT()

    if A + B == 5: print(1)
    elif A + B == 4: print(2)
    else: print(3)


if __name__ == '__main__':
    main()

Solution (Python):
A=int(input())
B=int(input())
L=[1,2,3]
L.remove(A)
L.remove(B)
print(L[0])

Solution (Python):
import numpy as np

input_line = [input() for i in range(2)]

data = [0 for i in range(2)]

data[0] = int(input_line[0])
data[1] = int(input_line[1])

print(6-data[0]-data[1])

Solution (Python):
A = int(input())
B = int(input())
ab_sum = A + B
if ab_sum == 3:
  print("3")
elif ab_sum == 4:
  print("2")
else:
  print("1")

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A = read_a_int()
B = read_a_int()

ls = [1, 2, 3]
ls.remove(A)
ls.remove(B)

print(ls[0])

Solution (Python):
A=int(input())
B=int(input())
if A+B==3:
  print("3")
elif A+B==4:
  print("2")
else:
  print("1")

Solution (Python):
A = int(input())
B = int(input())

L = [1,2,3]

for i in range(1,4):
  if i != A and i != B:
    print(i)

Solution (Python):
a=int(input())
b=int(input())

d=[a,b]
a=[1,2,3]
d.sort()
for i in range(2):
  a.remove(d[i])
print(a[0])

Solution (Python):
A = input()
B = input()
C = ["1","2","3"]
C.remove(A)
C.remove(B)
print(C[0])

Solution (Python):
a=int(input())
b=int(input())
if a==1 and b==2:
    print(3)
elif a==1 and b==3:
    print(2)
elif a==2 and b==1:
    print(3)
elif a==2 and b==3:
    print(1)
elif a==3 and b==1:
    print(2)
else:
    print(1)