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 = input()
b = input()
print("123".replace(a,"").replace(b, ""))

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==3:
        print(1)
    if B==1:
        print(3)
if A==3:
    if B==1:
        print(2)
    if B==2:
        print(1)

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

ans = [1, 2, 3]

answer = 0

for an in ans:
    if a != an and b != an:
        answer = an

print(answer)

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

cnt_list = [0] * 3

cnt_list[A-1] = 1
cnt_list[B-1] = 1

for i in range(3):
  if cnt_list[i] == 0:
    print(i + 1)
    break

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

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

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

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):
import sys
input = sys.stdin.readline

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

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

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

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

Solution (Python):
args = [int(input()) for i in range(2)]
list = [1, 2, 3]
for i in list:
    flg = False
    for j in args:
        if j == i:
            flg = True
    if not flg:
        print(i)

Solution (Python):
A=input()
B=input()
ans_list=[1,2,3]
for ans in ans_list:
    if ans!=int(A) and ans !=int(B):
        print(ans)

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

print(int(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 = input()
B = input()
X = ["1","2","3"]
X.remove(A)
X.remove(B)
print(str(X[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())

l = [1,2,3]

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

print(l[0])

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

print(6-a-b)

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

Solution (Python):
a1=int(input())
a2=int(input())
print(6-a1-a2)

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

li=[1,2,3]

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

print(li[0])

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

    return A, B


def solve(A, B):
    setA = set([1, 2, 3])
    setB = set([A, B])
    ans = str(setA - setB)[1]
    return ans


if __name__ == '__main__':
    A, B = read()
    print("%s" % solve(A,B))

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

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

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


list = [1,2,3]
c = int(a)-1
d = int(b)-1

list[c]= 4
list[d]= 4


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

Solution (Python):
def main():
    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)
    else:
        print(1)

if __name__ == '__main__':
    main()

Solution (Python):
def main():
  A = int(input())
  B = int(input())
  C = 6-A-B
  print('{}'.format(C))


if __name__ == '__main__':
  main()

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 == 3 and B == 2:
  print("1")
if A == 2 and B == 3:
  print("1")
if A == 3 and B == 1:
  print("2")
if A == 1 and B == 3:
  print("2")

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

Solution (Python):
import sys

if sys.platform =='ios':
   sys.stdin=open('input_file.txt')





s=int(input().strip())
t=int(input().strip())
a=[1,2,3]
a.remove(s)
a.remove(t)
print(a[0])

Solution (Python):
a = int(input())
b = int(input())
if (a,b > 0 and a,b <= 3):
    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)
else:
    pass

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

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

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

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



def main():
    N = int(input())
    M = int(input())
    ans = [1, 2, 3]
    ans.remove(N)
    ans.remove(M)
    print(ans[0])


if __name__ == "__main__":
    main()

Solution (Python):
A = int(input())
B = int(input())
if A>B:
    A, B = B, A

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

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())
if a+b==3:
  print("3")
elif a+b==4:
  print("2")
else:
  print("1")

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

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

print(C)

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

Solution (Python):
import sys
bbn=1000000007
	

		
def main():
	rets=[1,2,3]
	a = int(input())
	b = int(input())
	rets.pop(rets.index(a))
	rets.pop(rets.index(b))

	print(rets[0])
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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 = input()
B = input()
a = ["1","2","3"]
a.remove(A)
a.remove(B)
print(a[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):
print("".join(str(x) for x in ({1, 2, 3} - {int(input()), int(input())})))

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

goukei = a + b 

print(6-a-b)

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

Solution (Python):
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)

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 == 1 and b == 3:
  print("2")
elif a == 3 and b == 1:
  print("2")
elif a == 2 and b == 3:
  print("1")
else:
  print("1")

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

Solution (Python):
li = [1,2,3]
for i in range(2) :
    l = int(input())
    li[l-1] = 0
print(li[0] + li[1] + li[2])

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

s = [1,2,3]

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

Solution (Python):
A = int(input())
B = int(input())
print(str(6-sum([A, B])))

Solution (Python):
a=int(input())
b=int(input())
c=[0,0,0]
c[a-1]=1
c[b-1]=1
for t in range(3):
    if c[t]==0:
        print(t+1)
        break

Solution (Python):
import numpy as np
A = int(input())
B = int(input())

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

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

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

Ans = {"1", "2", "3"}
Ans.remove(A)
Ans.remove(B)

print("".join(Ans))

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

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

C = 6-A-B
print(C)

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

print(ans[0])

Solution (Python):

from sys import stdin
A=int(stdin.readline().rstrip())
B=int(stdin.readline().rstrip())
mylist = [1,2,3]
for x in mylist:
	if x == A:
		pass
	elif x == B:
		pass
	else:
		print(x)

Solution (Python):
s = set([1,2,3])
A=int(input())
B=int(input())
C=[A,B]
D=set(C)
E=s-D
F=list(E)
ans=F[0]
print(ans)

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

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

print(6-A-B)

Solution (Python):
a = input().rstrip()
b = input().rstrip()
answers = list('123')
answers.remove(a)
answers.remove(b)
print(answers[0])

Solution (Python):
print("".join(str(x) for x in ({1, 2, 3} - {int(input()), int(input())})))

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

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

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

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

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

temp = a+b

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

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

Solution (Python):
A, B = [int(input()) for _ in range(2)]
print(6 - A - B)

Solution (Python):
print(6-int(input())-int(input()))

Solution (Python):
a, = map(int, input().split())
b, = map(int, input().split())
for  i in range(3):
    if i+1 in [a,b]: 
        continue
    else:
        print(i+1)

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):
A = int(input())
B = int(input())
 
ans = ""
 
if A == 1 and B == 2:
  ans = "3"
elif A == 1 and B == 3:
  ans = "2"
elif A == 2 and B == 1:
  ans = "3"
elif A == 2 and B == 3:
  ans = "1"
elif A == 3 and B == 1:
  ans = "2"
elif A == 3 and B == 2:
  ans = "1"
  
print(ans)

Solution (Python):
import math
import fractions

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors

def bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res



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())
li = [1,2,3]
for i in li:
	if i != A and i != B:
		print(i)

Solution (Python):
first_num = int(input())
second_num = int(input())

list_res = [1,2,3]
list_res.remove(first_num)
list_res.remove(second_num)

print(list_res[0])

Solution (Python):

A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C=2
    if B==2:
        C=1

print(C)

Solution (Python):
def solve(a, b):
    base = [1, 2, 3]
    base.remove(a)
    base.remove(b)
    return base[0]


def main():
    a = int(input())
    b = int(input())
    res = solve(a, b)
    print(res)


def test():
    assert solve(3, 1) == 2
    assert solve(1, 2) == 3


if __name__ == "__main__":
    test()
    main()

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

List = [1, 2, 3]
for i in List:
    if i != A:
        if i != B:
            print(i)

Solution (Python):
print("".join(str(x) for x in ({1, 2, 3} - {int(input()), int(input())})))

Solution (Python):
s=input()
t=input()
print(6-int(s)-int(t))

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

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):
a = int(input())
b = int(input())
print (6-(a+b))

Solution (Python):
a=set(input())
b=set(input())
ans={"1","2","3"}
c=str(ans-a-b)
print(c[2])

Solution (Python):
x=6
x=x-int(input())
x=x-int(input())
print(x)

Solution (Python):
A = int(input())
B = int(input())
target = sum([A, B])
print(6-target)

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):
A = int(input())
B = int(input())

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


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

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

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

Solution (Python):
print(6-int(input())-int(input()))

Solution (Python):
x = int(input())
y = int(input())

if (x==1)&(y==2):
    print('3')
elif (x==2)&(y==3):
    print('1')
elif (x==3) & (y==1):
    print('2')
elif (x==1) & (y==3):
    print('2')
elif (x==2) & (y==1):
    print('3')
elif (x==3) & (y==2):
    print('1')

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

l = [1,2,3]

l.remove(A)
l.remove(B)

print(l[0])

Solution (Python):
number1 = int(input())
number2 = int(input())
 
n_list = [1,2,3]
 
n_list.remove(number1)
n_list.remove(number2)
 
print(n_list[0])

Solution (Python):
i=int(input())
j=int(input())
a=6-(i+j)
print(str(a))

Solution (Python):


from fractions import gcd
from math import ceil,floor
import collections







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

ans = 0
sum = A+B


if sum == 3:
    ans = 3
if sum == 4:
    ans = 2
if sum == 5:
    ans = 1

print(ans)

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

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

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

print(p[0])

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(A,B):
    """Test Case
    >>> print_ans(3, 1)
    2
    >>> print_ans(1, 2)
    3
    """
    ans = [1, 2, 3]
    lists = [A, B]
    for a in ans:
        flg = True
        for b in lists:
            if a == b:
                flg = False
                break
        if flg:
            print(a)

if __name__ == '__main__':
    A = int(input().rstrip())
    B = int(input().rstrip())
    print_ans(A,B)

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

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

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

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

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

ans=0
if a+b==3: ans=3
if a+b==4: ans=2
if a+b==5: ans=1
print(ans)

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

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

all = [1,2,3]

for num in wrong_answer:
  if num in all:
    all.remove(num)
    
print(all[0])

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

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

Solution (Python):
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")
else:
  print("1")

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

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

if min(A, B)==1:
  print('3' if max(A, B) == 2 else '2')
else:
  print('1')

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

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

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

Solution (Python):
for x in ({1,2,3} - {int(input()), int(input())}): 
    print(x)

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



print(6-(a+b))

Solution (Python):
l = list()
for i in range(2):
	x = int(input())
	l.append(x)
if 1 not in l:
	print(1)
elif 2 not in l:
	print(2)
elif 3 not in l:
	print(3)

Solution (Python):
a=set([int(input()) for i in range(2)])
c=set([1,2,3])
for i in c-a:
    print(i)

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

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

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())
l = [1, 2, 3]
l.remove(a)
l.remove(b)
print(l[0])

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

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

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

Solution (Python):
import sys

choices = [1,2,3]
for l in sys.stdin:
    choices.remove(int(l))

print(choices.pop())

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

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

print(num[0])

Solution (Python):
print("".join(str(x) for x in ({1, 2, 3} - {int(input()), int(input())})))

Solution (Python):
s=[int(input()) for i in range(2)]
if s[0]+s[1]==3:
	print("3")
elif s[0]+s[1]==4:
	print("2")
elif s[0]+s[1]==5:
	print("1")
else:
	print("error")

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

for i in range(1, 4):
  if i == A:
    continue
  if i == B:
    continue
  print(i)
  exit()

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

print(6 - a - b)

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

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):
ans = ['1', '2', '3']

a = input()
b = input()

ans.remove(a)
ans.remove(b)

print(ans[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())
sum=6
print(sum-a-b)

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

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

print(list(ans)[0])

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

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

print(6-a-b)

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

Solution (Python):

import sys
import itertools
import math

i=0
j=0
A=int(input())
B=int(input())
ans=[1,2,3]

for j in range(100):
 for i in range(3):
  if ans[i]!=A and ans[i]!=B:
      print(ans[i])
      sys.exit()

Solution (Python):
raw_input1 = input()
raw_input2 = input()

A = int(raw_input1)
B = int(raw_input2)

answers = [1,2,3]

answers.remove(A)
answers.remove(B)


for ans in answers:
    print(ans)

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

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

answers = {1:True, 2:True, 3:True}
answers.pop(A)
answers.pop(B)
print(list(answers.keys())[0])

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

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

Q = [1,2,3]

for i in range(3):
    if Q[i] == A:
        Q[i] = 0
    
    elif Q[i] == B:
        Q[i] = 0

print(sum(Q))

Solution (Python):
a=input()
b=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

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

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

ans = {"1","2","3"}
ans = set(ans)

ans.remove(A)
ans.remove(B)
a = 0

if "1" in ans:
    print("1")
else:
    a = 1
if "2" in ans:
    print("2")
else:
    a = 1
if "3" in ans:
    print("3")
else:
    a = 1

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

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

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

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

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

Solution (Python):
if __name__=='__main__':
    a=int(input())
    b=int(input())
    if a*b==2:
        print("3")
    elif a*b==3:
        print("2")
    elif a*b==6:
        print("1")

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

ans = 0
if (A == 1 and B == 2) or (A == 2 and B == 1):
    ans = 3
elif (A == 1 and B == 3) or (A == 3 and B == 1):
    ans = 2
elif (A == 2 and B == 3) or (A == 3 and B == 2):
    ans = 1

print(ans)

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

Solution (Python):
number1 = int(input())
number2 = int(input())

n_list = [1,2,3]

n_list.remove(number1)
n_list.remove(number2)

print(n_list[0])

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

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

print(6 - A - B)

Solution (Python):
import sys

s = set([int(input()), int(input())])
a = {1,2,3} - s

print(list(a)[0])

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())
AB = [A,B]
if not 1 in AB:
    print(1)
elif not 2 in AB:
    print(2)
elif not 3 in AB:
    print(3)

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

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

print(i[0])

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

Solution (Python):
n1 = int(input())
n2 = int(input())
 


 
if n1 == 1:
  if n2 == 2:
    print("3")
  else:
    print("2")
elif n1 == 2:
  if n2 == 1:
    print("3")
  else:
    print("1")
elif n1 ==3:
  if n2 == 1:
    print("2")
  else:
    print("1")

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):
arr = [int(input()) for i in range(2)]

if sum(arr) == 3: print(3)
if sum(arr) == 4: print(2)
if sum(arr) == 5: print(1)

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 == 3:
  print(1)
elif A == 2 and B == 1:
  print(3)
elif A == 3 and B == 1:
  print(2)
elif A == 3 and B == 2:
  print(1)

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

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

Solution (Python):


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

answer_set = [1, 2, 3]

answer_set.remove(A)
answer_set.remove(B)

print(answer_set[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):
m = [1,2,3]
a = int(input())
b = int(input())

m.pop(m.index(a))
m.pop(m.index(b))
print(m[0])

Solution (Python):
a = list(input().split())
b = list(input().split())

x = int(a[0]) + int(b[0])

if x == 3 :
  print(3)
if x == 4 :
  print(2)
if x == 5 :
  print(1)

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

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

ans.pop(ans.index(A))
ans.pop(ans.index(B))

print(ans[0])

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

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

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

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

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

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 == 3:
  print(1)
elif A == 2 and B == 1:
  print(3)
elif A == 3 and B == 1:
  print(2)
elif A == 3 and B == 2:
  print(1)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

    ans = [1, 2, 3]
    ans.remove(A)
    ans.remove(B)
    print(ans[0])
if __name__ == '__main__':
    main()

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

Solution (Python):
s=int(input())
t=int(input())
list=[]
list.append(1)
list.append(2)
list.append(3)
list.remove(s)
list.remove(t)
print(*list)

Solution (Python):
A = input()
B = 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())
i = 1
while i<=3:
    if a!=i and b!=i:
        print(i)
        break
    i += 1

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

Solution (Python):
num1 = int(input())
num2 = int(input())
numbers = [1,2,3]
new_numbers = [num for num in numbers if num != num1]
new_numbers_2 = [num for num in new_numbers if num != num2]
ans = new_numbers_2[0]
print(ans)

Solution (Python):
a,b=input(),input()
s=set("123")
s.discard(a)
s.discard(b)
print(s.pop())

Solution (Python):
a=int(input())
b=int(input())
for i in range(3):
  if (a-1 != i and b-1 != i ):
    print(i+1)

Solution (Python):
input1 = int(input())
input2 = int(input())

ans_set = set([1,2,3]) - set([input1,input2])

print([ans for ans in ans_set][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())
C = [1, 2, 3]
C.remove(A)
C.remove(B)
print(C[0])

Solution (Python):
number1 = int(input())
number2 = int(input())
choices = [1,2,3]
choices.remove(number1)
choices.remove(number2)
print(*choices)

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

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

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

print(6 - (a+b))

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

for number in num:
    if number == a or number == b:
        continue
    print(number)

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

list=[1,2,3]
list.remove(a)
list.remove(b)
for i in list:
    print(i)

Solution (Python):
answers=list(range(1,4))
answers.remove(int(input()))
answers.remove(int(input()))
print(answers[0])

Solution (Python):
S = []
for _ in range(2):
    S.append(int(input()))  

if {S[0],S[1]} == {1,2}:
    print(3)
elif {S[0],S[1]}=={2,3}:
    print(1)
elif {S[0],S[1]}== {3,1}:
    print(2)

Solution (Python):
ab = []

ab.append(int(input()))
ab.append(int(input()))

def solve():
  if 1 not in ab:
    print(1)
  elif 2 not in ab:
    print(2)
  
  elif 3 not in ab:
    print(3)

def main():
  solve()

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):
a=int(input())
b=int(input())
c=1
for i in range(3):
  if a==c or b==c:
    c=c+1
  else:
    print(c)
    break

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

print(6 - A - B)

Solution (Python):
from fractions import gcd

from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7



def lcm(a, b):
    return a * b / fractions.gcd(a, b)

def main():
    a = int(input())
    b = int(input())
    for i in range(1, 4):
        if not (i == a or i == b):
            print(i)
            exit()


    
    

        


if __name__ == '__main__':
    main()

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 = 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==3:
	print(int(3))
elif a+b==4:
	print(int(2))
else:
	print(int(1))

Solution (Python):
a = int(input())
b = int(input())
c = [1,2,3]
n = 0
m = 0
for i in range(3):
    if a == c[i]:
        n = a
    if b == c[i]:
        m = b
        
s = sum(c)
print(s-n-m)

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

Solution (Python):
a=int(input())
b=int(input())
ans=int(0)
l=[a, b]
l.sort()

if l[0]==2:
    ans=1

if l[0]==1 and l[1]==3:
    ans=2
if l[1]==2:
    ans=3


print(ans)

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