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]

for i in ans:
    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())

print(6 - a - b)

Solution (Python):
a=int(input())
b=int(input())
n=[1,2,3]
n.remove(a)
n.remove(b)
print(n[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())
for n in [1,2,3]:
    if n!=a and n!=b:
        print(n)

Solution (Python):

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

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

Solution (Python):
if __name__ == "__main__":
    ans = 6
    a = int(input())
    b = int(input())
    print(6 // a // b)

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

print(6-a-b)

Solution (Python):
print(6-sum(map(int,open(0))))

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

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

print(6-A-B)

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

Solution (Python):
A = input()
B = 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("{}".format(6 - (A + B)))

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

Solution (Python):

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

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

Solution (Python):


def main():
    *AB, = map(int, open(0).read().split())
    I = [1, 2, 3]
    C = set(I) - set(AB)
    print(list(C)[0])


main()

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

print(6 - (a+b))

Solution (Python):
choice = [1, 2, 3]
wrongs = [0 for _ in range(2)]
wrongs[0] = int(input())
wrongs[1] = int(input())

choice.remove(wrongs[0])
choice.remove(wrongs[1])
print(choice[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("3")
elif c==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())
print(6 - a - b)

Solution (Python):
A, B = int(input()), 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 [1, 2, 3]:
    if i != A and i != B:
        print(i)

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

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

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

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

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

Solution (Python):

s = [1,2,3]
i = int(input())
k = int(input())
s.remove(i)
s.remove(k)
print(s[0])

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A = ri()
B = ri()

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

Solution (Python):
def main():
    A = int(input())
    B = int(input())
    print(6-(A+B))
if __name__ == "__main__":
    main()

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

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

Solution (Python):

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

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

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())
print(6-A-B)

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

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
a = int(sys.stdin.readline())
b = int(sys.stdin.readline())
print(6-a-b)

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

for i in range(1, 4):
  if i == a or i == b:
    continue
  print(i)

Solution (Python):
A = {int(input())}
B = {int(input())}
l = {1, 2, 3}
print(list(l-A-B)[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())
c = 6-(a+b)
print(c)

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

Solution (Python):
import sys
import math
import itertools

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

for x in range(1, 4):
    if x == a: continue
    if x == b: continue
    print(x)

Solution (Python):
from math import sqrt
from decimal import Decimal
ans = [1,2,3]
A,B=int(input()),int(input())
ans.remove(A)
ans.remove(B)
print(ans[0])

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

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


if __name__ == "__main__":
    main()

Solution (Python):


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

print(6 - a - b)

Solution (Python):
A = int(input())
B = int(input())
C = {1,2,3}-{A,B}
print(list(C)[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=6-a-b
print(c)

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

print(6-a-b)

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

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

Solution (Python):

import math


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

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

s={A,B}
D={1,2,3}
for i in (D-s):
  print(i)

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

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

Solution (Python):
from itertools import permutations as perm
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    A, B = input([int, 2])
    print(({1, 2, 3} - {A, B}).pop())


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

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

s = {1, 2, 3}
s.discard(a)
s.discard(b)
print(s.pop())

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

ans = 6 - a - b
print(ans)

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

s = [1, 2, 3]

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

print(s[0])

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

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

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

abc = "123"

abc = abc.replace(a, "")
abc = abc.replace(b, "")

print(abc)

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

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

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

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

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


if __name__ == '__main__':
    q1()

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


print([[],[0,0,3,2,],[0,3,0,1,],[0,2,1,0]][int(input())][int(input())])

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

c = 1 if a != 1 and b != 1 else (2 if a != 2 and b != 2 else 3)

print(c)

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

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

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

Solution (Python):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    AB = [ii() for _ in range(2)]
    ret = {1, 2, 3}
    print(*ret-set(AB))


if __name__ == '__main__':
    main()

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

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

print(6-a-b)

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

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

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

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

s = {1,2,3}

q = {a, b}

print(list((s-q))[0])

Solution (Python):
a = [int(input())]
b = [int(input())]
l = [1, 2, 3]
ans = set(l) - set(a) -set(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())
print(6-a-b)

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

list = [1, 2, 3]

for i in list:
    if i != A and i != B:
        print(i)

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

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

Solution (Python):


import sys







from itertools import count, cycle, repeat     
from itertools import groupby                  
from itertools import starmap                  








def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    L = [True, True, True]
    L[ii()-1] = False
    L[ii()-1] = False
    for i in range(3):
        if L[i]:
            print(i+1)
          

if __name__ == "__main__":
    main()

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

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 != 1:
    print(1)
elif A != 2 and B != 2:
    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())
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):
A = int(input())
B = int(input())
print(6-A-B)

Solution (Python):
icase=0
if icase==0:
    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):
i = int(input())
j = int(input())

print(6 - (i + j))

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

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

Solution (Python):
def input1():
	return int(input())


def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))






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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A = INT()
B = INT()
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())
for i in range(1,4):
  if i!=a and i!=b: print(i)

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

Solution (Python):
a = [int(input()) for i in range(2)]
for x in range(1,4):
    if not x in a:
        print(x)

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

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

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

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

Solution (Python):

import sys
import numpy as np


def solve(A: int, B: int):
    ans = np.array([1,2,3])
    ans[A-1]=0
    ans[B-1]=0
    print(ans.sum())

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

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

c.remove(a)
c.remove(b)

print(c[0])

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

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

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

nums = [1, 2, 3]

nums.remove(A)
nums.remove(B)

print(nums[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]
for i in lst:
    if a != i and b != i:
        print(i)

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

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, b = map(int, open(0).read().split())
print(6-a-b)

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

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())
print(6-A-B)

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

print(6-A-B)

Solution (Python):
A = int(input())
B = int(input())
print(6-(A+B))
'''
x = [1, 2, 3]
if A == x :
    print("yes")
else :
    print("no")
'''

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

Solution (Python):
print(6-sum(map(int, open(0).read().split())))

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

Solution (Python):
a = input()
b = input()
no = {a,b}
for s in ['1','2','3']:
    if(not s in no):
        print(s)

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

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

print(*L)

Solution (Python):
a=input()
b=input()
ans='123'
print(ans.replace(a,'').replace(b,''))

Solution (Python):

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

print(6-A-B)

Solution (Python):
A = int(input())
B = int(input())
tmp = A + B
print(1 if tmp==5 else 2 if tmp==4 else 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):
a=int(input())
b=int(input())
print(6-a-b)

Solution (Python):
num1 = int(input())
num2 = int(input())

for i in range(1,4):
  if i!=num1 and i!=num2:
    print(i)

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

print(6-(a+b))

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

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

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

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

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

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):
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
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

a = int(readline())
b = int(readline())
ans = [1, 2, 3]
for i in ans:
    if i != a and i != b:
        print(i)

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

total = 6

ans = 6 - A - B

print(ans)

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

total = 6

ans = 6 - A - B

print(ans)

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

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

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[0])

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

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[0])

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

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[0])

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

for i in range(2):
    num=input()
    ans.remove(num)
print(ans[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())
print(6-a-b)

Solution (Python):
choice = {1, 2, 3}
magic = set()
A = magic.add(int(input()))
B = magic.add(int(input()))

print(list(choice - magic)[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):

L = [int(input()) for i in range(2)]


all_x = [1,2,3]
for i in L:
    all_x.remove(i)

print(all_x[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())
N = [1,2,3]
N.remove(A)
N.remove(B)
print(int(N[0]))

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

List = {a, b}

if List == {1, 2}:
  print(3)
if List == {2, 3}:
  print(1)
if List == {3, 1}:
  print(2)

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

answer = TOTAL - A - B

print(answer)

Solution (Python):
res=0

for i in range(2):
    t=int(input())
    res += t

print(6-res)

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 = 6 - A - B

print(C)

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

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

Solution (Python):

import sys


def solve(A: int, B: int):
    answers = set([1, 2, 3])
    answers.remove(A)
    answers.remove(B)
    for i in answers:
        print(i)
        exit()
    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())

print(6-a-b)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


def main():
    A = int(input())
    B = int(input())
    print(6 - A - B)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')


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

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

if __name__ == '__main__':
    main()

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

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

print(6 - (a + b))

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

c = a + b
print(6 - c)

Solution (Python):
from sys import stdin

A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())

print(6 - (A + B))

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

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

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

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

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

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

Solution (Python):

a, b = [int(input()) for _ in range(2)]
print(6 - a - b)

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

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

Solution (Python):




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

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
a = int(input())
b = int(input())
d = [1,1,1]
d[a-1] -= 1
d[b-1] -= 1
for i, num in enumerate(d):
  if num:
    print(i+1)
    break

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

print(6 - A - B)

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A = ir()
B = ir()
S = {A, B}
for x in [1, 2, 3]:
    if x not in S:
        print(x)

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

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

sum = A + B
ans = 6 - sum

print(ans)

Solution (Python):
a=input()
b=input()
print("123".replace(a,"").replace(b,""))

Solution (Python):
A = int(input())
B = int(input())
ABC = {1, 2, 3}
AB = {A, B}
print(list(ABC-AB)[0])

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

list = [1,2,3]

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

Solution (Python):
import itertools
import fractions
def main():
  s = [1,2,3]
  s.remove(int(input()))
  s.remove(int(input()))
  print(s[0])
if __name__ == '__main__':
  main()

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

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

ans = [1,2,3]
ans.remove(s)
ans.remove(t)
print(ans[0])

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

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

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

def solve():
    A = int(input())
    B = int(input())
    Num = set([A, B])
    All = set([1, 2, 3])
    All -= Num
    for key in All: print(key)

    return 0

if __name__ == "__main__":
    solve()

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

print(6-A-B)