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-----
3
1

-----Sample Output-----
2

When we know 3 and 1 are both wrong, the correct choice is 2.

Difficulty: introductory

Starter code:

Solutions:
a = int(input())
b = int(input())

c = 1+2+3

print((c - (a+b)))


A = input()
B = input()
candidate = set(('1', '2', '3'))
exclude = set((A, B))
print((candidate - exclude).pop())

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

a=int(input())
b=int(input())
ans=6-a-b
print(ans)

# -*- coding: utf-8 -*-
a = int(input())
b = int(input())
if a + b == 3:
    print((3))
elif a + b == 4:
    print((2))
else:
    print((1))


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

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

a=int(input())
b=int(input())
if a+b==3:
  print(3)
elif a+b==4:
  print(2)
elif a+b==5:
  print(1)

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

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

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

ans = [1, 2, 3]
ans.remove(int(input()))
ans.remove(int(input()))
print(ans[0])

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

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

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

#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    A = int(input())
    B = int(input())
    for i in range(1, 4):
        if i != A and i != B:
            print(i)
            break


def main():
    solve()


def __starting_point():
    main()

__starting_point()

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

ls = [1,2,3]
ls.remove(int(input()))
ls.remove(int(input()))
print(ls[0])

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

for i in range(1,4):
  # 1...3
  if a != i and b != i:
    print(i)

print(int(input())^int(input()))

l = [1,2,3]
l.remove(int(input()))
l.remove(int(input()))
print((l[0]))


print(6-int(input())-int(input()))

a = int(input())
b = int(input())
for i in range(1,4):
    if i not in [a,b]:
        print(i)

#!/usr/bin/env python3
import sys
from itertools import chain


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


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    answer = solve(A, B)
    print(answer)


def __starting_point():
    main()

__starting_point()

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")
else:
  print("2")

print(*set([1,2,3])^set([int(input()),int(input())]))

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


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

print((6-a-b))


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


A = int(input())
B = int(input())
 
# 頭いい方法！
print(6-A-B)

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 == 2:
    print(1)
  else:
    print(2)

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


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

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

print(6-int(input())-int(input()))

a = int(input())
b = int(input())
for i in range(1, 4):
  if i != a and i != b:
    print(i)

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


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

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

print(ans_list[0])

a = int(input())
b = int(input())
ans_set = [1,2,3]
ans_set.remove(a)
ans_set.remove(b)
print(ans_set[0])

L = [1,2,3]
a = int(input())
b = int(input())
L.remove(a)
L.remove(b)
print(L[0])

a = int(input())
b = int(input())
l = [1,2,3]
if a>b:
  l.pop(a-1)
  l.pop(b-1)
else:
  l.pop(b-1)
  l.pop(a-1)
print(l[0])

A = int(input())
B = int(input())
lis = [1, 2, 3]
x = lis.index(A)
y = lis.index(B)
lis[x] = 0
lis[y] = 0
ans = sum(lis)
print(ans)

print(1^2^3^int(input())^int(input()))

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

a=int(input())
b=int(input())
print('1' if a+b==5 else'2' if a+b==4 else '3' )

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

print(6-int(input())-int(input()))

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

ab={A,B}
All={1,2,3}

Ans=list(All-ab)

print((Ans[0]))


print(6-int(input())-int(input()))

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))
else:
  print((2))



print((6 - int(input()) - int(input())))


u = {1,2,3}
d = {int(input()) for i in range(2)}
print(list(u-d)[0])

L=[1,2,3]

d=int(input())
L.remove(d)
d=int(input())
L.remove(d)


print(L[0])

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

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

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

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

ans = {1,2,3} - {a,b}
print(ans.pop())

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

print(6 - A - B)

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

ans=list(range(1,4))
for i in range(2):
    ans.remove(int(input()))

print(ans[0])

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)

a= int(input())

b = int(input())

print(6 - a - b)

X = {1,2,3}
a = {int(input())}
b = {int(input())}
print(list(X-a-b)[0])

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

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

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

print(6 - A - B)

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

print(6-a-b)

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

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

if (A == 1 and 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)

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

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

print(6 - A - B)

A,B = [int(input()) for _ in range(2)]
print(list(set([1,2,3])-set([A,B]))[0])

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

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)

a=int(input())
b = int(input())
s = set([1,2,3])
s.remove(a)
s.remove(b)
print(*s)

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


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

print(6-a-b)

num_l = [1, 2, 3]
num_l.remove(int(input()))
num_l.remove(int(input()))
print(num_l.pop())

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

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



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


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

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

print(6-A-B)

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

s = int(input())
a = int(input())

print(6-s-a)

a=int(input())
b=int(input())
print('1' if a+b==5 else'2' if a+b==4 else '3' )

ab=[int(input()) for i in range(2)]
print(*{1,2,3}-set(ab))

Ans = ["1", "2", "3"]

for i in range(2):
    a = input()
    Ans.remove(a)

print(Ans[0])

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

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

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

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

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

num = [1, 2, 3]
num.remove(int(input()))
num.remove(int(input()))
print(num.pop())
return

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

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

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

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

print(6 - a - b)

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

print(ans[0])

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

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

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")
else:
  print("2")

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

for i in range(1,4):
  if i !=a and i!= b:
    print(i)

x = int(input())
y = int(input())
if (x == 1 and y == 2) or (x == 2 and y == 1):
    print((3))
if (x == 1 and y == 3) or (x == 3 and y == 1):
    print((2))
if (x == 3 and y == 2) or (x == 2 and y == 3):
    print((1))


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")