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

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

print(ans[0])

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

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

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

reflist=['1','2','3']
next1=[s for s in reflist if A not in s]
next2=[s for s in next1 if B not in s]
print(next2[0])

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

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

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

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

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

list = [1,2,3]

list.remove(a)
list.remove(b)

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

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

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

Solution (Python):
one_two_three=[1,2,3]
a=int(input())
b=int(input())
one_two_three.remove(a)
one_two_three.remove(b)
print(one_two_three[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.pop(l.index(A))
l.pop(l.index(B))
print(l[0])

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

C = []
C.append(A)
C.append(B)

answer = {1, 2, 3} - set(C)
print(*answer)

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):
answer = [1,2,3]
in1 = int(input())
in2 = int(input())
answer.remove(in1)
answer.remove(in2)
print(answer[0])

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(a!=i and b!=i):
        print(i)

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

print(answer)

Solution (Python):
t = [int(input()) for i in range(2)] 
k = [1,2,3]
for i in k:
  if i in t:
    pass
  else:
    print(i)

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

print(6-a-b)

Solution (Python):
a = input()
b = input()
abc = "123"
for item in abc:
    if item not in [a,b]:
        print(item)

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

Solution (Python):
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(1, 2), 3)


def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    a = read_int(1)[0]
    b = read_int(1)[0]
    return a, b


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    s = set()
    s.add(a)
    s.add(b)
    if 1 in s:
        if 2 in s:
            return 3
        else:
            return 2
    else:
        return 1


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

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

c = a + b

if c == 3:
  ans = 3
elif c == 4:
  ans = 2
else:
  ans = 1

print(ans)

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

l = [1,2,3]

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

print(l[0])

Solution (Python):
import math
import sys

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

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

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

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

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

Solution (Python):
import sys

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

main()

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

    ans_list = [1, 2, 3]
    for i in range(3):
        if ans_list[i] == a or ans_list[i] == b:
            ans_list[i] = -1
    ans = 0
    for i in range(3):
        if ans_list[i] > 0:
            ans = ans_list[i]

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

if a > b:
    tmp = a
    a = b
    b = tmp

if (a == 1) & (b == 2):
    print("3")
if (a == 2) & (b == 3):
    print("1")
if (a == 1) & (b == 3):
    print("2")

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

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

for i in range(1, 4):
    if i not in [A, B]:
        print(i)
        exit(0)

Solution (Python):
AB = [int(input()) for _ in range(2)]

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

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

Solution (Python):
a = int(input())
b = int(input())
c = [i for i in range(1,4)]
for j in range(0,len(c)):
    if c[j] != a and c[j] != b:
        print(int(c[j]))

Solution (Python):
a=str(input())
b=str(input())
c=["1","2","3"]
for i in range(3):
    if c[i]==a or c[i]==b:
        c[i]=""
print("".join(c))

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 = input()
B = input()
 
choices = "123"
answer = [x for x in choices if x != A and x != B]

print(int(answer[0]))

Solution (Python):
A = input()
B = input()
row = ['1','2','3']
row.remove(A)
row.remove(B)
print(row[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)
elif a == 3 and b == 2:
    print(1)

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

c = [1, 2, 3]

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

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

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

Solution (Python):

s1 = input()
s2 = input()

ABC = {"1", "2", "3"}

ans = ABC - {s1, s2}

for i in ans:
	print(i)

Solution (Python):
s =set()
for i in range(2):
    n = int(input())
    s.add(n)
for i in range(1,4):
    if i not in s:
        print(i)

Solution (Python):
import sys
sys.setrecursionlimit(10000000)







INF = 500000
MOD = 10**9+7

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

Solution (Python):
import sys

input = sys.stdin.readline
s = [input()[:-1], input()[:-1]]
l = ["1", "2", "3"]

print(list(filter(lambda x: x not in s, l))[0])

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(C)
else:
    print(abs(A-B))

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

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

for i in inputs:
    for j in ans:
        if i==j:
            ans.remove(i)
            
print(ans[0])

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

ans_list = []
ans_list.append(A)
ans_list.append(B)
correct_list = [1,2,3]

ans = list(set(correct_list) - set(ans_list))
print(ans[0])

Solution (Python):
A = input()
B = input()
str = "123"

str = str.replace(A,"")
str = str.replace(B,"")

print(str)

Solution (Python):
l1 = [1,2,3]
l2 = [int(input()) for i in range(2)]
ans = list(set(l1) - set(l2))
print(ans[0])

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

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


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

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

print(ans)

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

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

Solution (Python):
a = int(input())
b = int(input())
ans = (3, 1, 2)
print([i for i in ans if i != a and i != b][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 = list(str(input()) for i in range(2))

if A.count('1') == 1 and A.count('2') == 1:
    print(3)
elif A.count('2') == 1 and A.count('3') == 1:
    print(1)
else:
    print(2)

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

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

a = np.array([1,1,1])
a[A-1] = 0
a[B-1] = 0
print(np.where(a==1)[0][0] + 1)

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

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

print(*li)

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

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

print(6-n-m)

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

print(6-a-b)

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

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

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

A=input()
B=input()

list.remove(A)
list.remove(B)

print(list[0])

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

for i in [1, 2, 3]:
    if i not in {A, B}:
        print(i)
        exit()

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

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

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

Solution (Python):
a = input()
b= input()
array = ['1','2','3']
for s in range(len(array)-1, -1 , -1):
    if a == array[s] or b == array[s]:
        del array[s]
print(array[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)
else:
  print(1)

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

for i in nums:
  if int(i) != a and int(i) != b:
    c = int(i)
    
print(c)

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

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

li = [a,b]

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

Solution (Python):
def main():
    A = int(input())
    B = int(input())
    for i in range(1,4):
        if i not in (A,B):
            print(i)
            break
main()

Solution (Python):
A=int(input())
B=int(input())
c=[1,2,3]
c.remove(A)
c.remove(B)
print(c[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())
print(6-A-B)

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

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

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):
from sys import stdin

a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

c = 6 - a - b

print(c)

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

ans = 6 - (A+B)

print(ans)

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

    lst = [1,2,3]

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

if __name__ == "__main__":
    main()

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

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

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

a = [True for _ in range(3)]
a[A-1] = False
a[B-1] = False

for i, v in enumerate(a):
    if v:
        print(i+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())

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)
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())
 
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):
List = [1,2,3]
a,b=[int(input()) for i in range(2)]
List.remove(a)
List.remove(b)
print(List[0])

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

for i in range(1,4):
  if i in a:
    count = 0
  else:
    print(i)

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):
print("".join(str(x) for x in ({1, 2, 3} - {int(input()), int(input())})))

Solution (Python):


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

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

print(c[0])

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

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

for i in l:
  if i != a:
    l1.append(i)
for i in l1:
  if i != b:
    print(i)

Solution (Python):


def answer(A, B):
  if (A == 1 and B == 2):
    return 3
  if (A == 1 and B == 3):
    return 2
  if (A == 2 and B == 1):
    return 3
  if (A == 2 and B == 3):
    return 1
  if (A == 3 and B == 1):
    return 2
  if (A == 3 and B == 2):
    return 1

A = int(input())
B = int(input())
X = answer(A, B)
print(X)

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())
list = [1, 2, 3]

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

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

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

arr = ["1","2","3"]
arr.remove(a)
arr.remove(b)
print(arr.pop())

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

Solution (Python):
sum=0
sum+=int(input())
sum+=int(input())
print(6-sum)

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

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

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

lis.remove(int(input()))
lis.remove(int(input()))

print(lis[0])

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

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

Solution (Python):
can = set('1 2 3'.split())
can.remove(input())
can.remove(input())
print(can.pop())

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

list = [1, 2, 3]

for x in list:
    if (x == a):
        continue
    elif (x == b):
        continue
    else:
        print(x)

Solution (Python):

import sys
from fractions import gcd
from string import ascii_uppercase as ABC

def inpl(): return list(map(int, input().split()))
A = int(input())
B = int(input())

print(list(set([1, 2, 3]) - set([A, B]))[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())
ans = 6-(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):
ans = [1,2,3]

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

print(ans[0])

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

Solution (Python):
A = input()
B = input()
ABC = "123"
BC = ABC.replace(A,"")
print(BC.replace(B,""))

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

inset = {a,b}
if inset == {1,2}:
  print("3")
elif inset == {2,3}:
  print("1")
else:
  print("2")

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

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

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

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

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


if A in [1, 2] and B in [1, 2]:
    print(3)
elif A in [1, 3] and B in [1, 3]:
    print(2)
else:
    print(1)

Solution (Python):
A, B = map(int, open(0).read().split())

T = set([1, 2, 3])
S = set([A, B])
print(*(T - S))

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())
data=[0,0,0,0]
data[a]=1
data[b]=1
for i in range(1,4):
    if data[i]==0:
        print(i)
        break

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

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

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

Solution (Python):
a = int(input())
b = int(input())
ans = 6 - 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):
A = int(input())
B = int(input())
print([x for x in [1,2,3] if not x in [A, B]][0])

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

for _ in range(2):
  a.remove(input())


print(*a)

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

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

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

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

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

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

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

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


def solve():
    answer = [1, 2, 3]
    answer.remove(A)
    answer.remove(B)

    print(answer[0])


solve()

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

l = [1,2,3]

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

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

print(6-A-B)

Solution (Python):

A = int(input())

B = int(input())


res = 6 - A - B


print(res)

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

if not a == 2 and not b == 2:
  print(2)

if not a == 3 and not b == 3:
  print(3)

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

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

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

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

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

print(list(set([1, 2, 3]).difference([A, B]))[0])

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

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

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



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

Solution (Python):
A, B = [int(input()) for i in range(2)]
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):
a = input()
b = input()
x = ["1","2","3"]
x.remove(a)
x.remove(b)
print(''.join(x))

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

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

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

Solution (Python):
A = str(input())
B= str(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):
answer = [1,2,3]
for i in range(2):
    answer.remove(int(input()))
print(answer[0])

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    a = [int(e) for e in lines[0].split(" ")][0]
    b = [int(e) for e in lines[1].split(" ")][0]

    return (a, b)


def solve(a, b):

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

    return answers[0]


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

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

Solution (Python):
a=int(input())
b=int(input())
if a==3 or b==3:
  print(abs(a-b))
else:
  print(3)

Solution (Python):



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

    print('{}'.format(6 - A - B))


if __name__ == "__main__":
    main()

Solution (Python):
a, b = input(), input()
for i in range(1, 4):
    i = str(i)
    if i not in [a, b]:
        print(i)
        exit()

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

ANS = {'1', '2', '3'}
ANS.remove(A)
ANS.remove(B)

for x in ANS:
    print(x)

Solution (Python):
kotae = ['1','2','3']
data1 = input()
data2 = input()

for st in kotae:
    if st not in (data1,data2):
        print(st)

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

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

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

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

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

ans = set([A, B])
a = set([1, 2, 3]) - ans
print(list(a)[0])

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

C = A + B

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

Solution (Python):
choices = '123'
A = input()
B = input()
print(choices.replace(A, "").replace(B, ""))

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

print(int(c))

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 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())
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!=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 = 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())
result = 0
if a != 1 and b != 1:
  result = 1
elif a != 2 and b != 2:
  result = 2
elif a != 3 and b != 3:
  result = 3

print(result)

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

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_list = [1,2,3]
print([i for i in ans_list if (i!=a and i!=b)][0])

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

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

if a[0]*a[1] == 6:
  print (1)
elif a[0]*a[1] == 3:
  print (2)
else:
  print (3)

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

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

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

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

Solution (Python):
S={"1", "2", "3"}
S.remove(input())
S.remove(input())
print(S.pop())

Solution (Python):

A = int(input())
B = int(input())
S = A+B
if(S == 3):
  print('3')
elif(S == 4):
  print('2')
else:
  print('1')

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

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

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

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

print(6-a-b)

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

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

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

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

print(a[0])