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

cands = list(range(1,4))
cands.remove(A)
cands.remove(B)
print(cands[0])

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

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

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

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

c = 1+2+3

print(c - (a+b))

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

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

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

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

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

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

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

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

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

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

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
from itertools import chain


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


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


if __name__ == "__main__":
    main()

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

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

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

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

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

print(6-A-B)

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

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

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

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

Solution (Python):
import os
import heapq
import sys,threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10**5)
from io import BytesIO, IOBase
def gcd(a,b):
    if b==0:

        return a
    else:
        return gcd(b,a%b)
def power(x, p,m):
    res = 1
    while p:
        if p & 1:
            res = (res * x) % m
        x = (x * x) % m
        p >>= 1
    return res
def inar():
    return [int(k) for k in input().split()]

def lcm(num1,num2):
    return (num1*num2)//gcd(num1,num2)

def main():
    take=[0]*3
    take[int(input())-1]=1
    take[int(input())-1]=1
    for i in range(3):
        if take[i]==0:
            print(i+1)




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

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

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

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

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

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


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


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


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


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


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


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


def main():
    solve()


if __name__ == '__main__':
    main()

Solution (Python):
print(6-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):
A = int(input())
B = int(input())
lis = [1, 2, 3]
x = lis.index(A)
y = lis.index(B)
lis[x] = 0
lis[y] = 0
ans = sum(lis)
print(ans)

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

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

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

print(6 - a - b)

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

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

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())
 
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())
ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)

print(ans[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())
for i in range(1, 4):
  if i not in [A, B]:
    print(i)

Solution (Python):

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

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

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

s.remove(int(input()))
s.remove(int(input()))

print(s[0])

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    print(6 - A - B)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
A = input()
B = input()
ans = '123'
print(ans.replace(A, '').replace(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 == 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())
anss = set([1, 2, 3])
anss.remove(A)
anss.remove(B)
for i in anss:
    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):
S=input()
S+=input()
print(*[a for a in '123' if a not in S])

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

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

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

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

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

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

    ans = 6 - A - B

    print(ans)


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

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

for c in choice:
    if c != A and c != 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):
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 = []
for i in range(2):
    a.append(int(input()))
if 1 not in a:
    print(1)
elif 2 not in a:
    print(2)
else:
    print(3)

Solution (Python):
A = int (input ())
B = int (input ())
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 or b == 1:
    if a == 2 or b == 2:
        print(3)
    else:
        print(2)
else:
    print(1)

Solution (Python):
a = int(input())
b  =int(input())
set_ = set([1,2,3])
set_.remove(a)
set_.remove(b)
print(set_.pop())

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

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

Solution (Python):


from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')


def solve(A: int, B: int):
    return [a for a in [1, 2, 3] if A != a != B][0]


def main():

    sys.setrecursionlimit(10 ** 6)

    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))  
    print(f'{solve(A, B)}')


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
s={int(input()) for s in range(2)}
a={1,2,3}
print(list(a-s)[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())
li=[a,b]
li.sort()
if li==[1,2]:print(3)
elif li==[2,3]:print(1)
else:print(2)

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

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

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

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

Solution (Python):
l = []
l.append(int(input().rstrip()))
l.append(int(input().rstrip()))
print(6 - sum(l))

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

s=[n1,n2]
s1=[1,2,3]
d=list(set(s1)-set(s))
print(d.pop())

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

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

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

n = [1,2,3]
n[a-1] = 0
n[b-1] = 0

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

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

Solution (Python):
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy


import heapq
sys.setrecursionlimit(10**6)

INF = 10**18
import bisect
import statistics
mod = 10**9+7


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

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

main()

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, bisect, math, itertools, string, queue, copy








def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a = inp()
b = inp()

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

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
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

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

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

print(({1,2,3} - {A, B}).pop())

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def main():
    A = I()
    B = I()
    print(6-(A+B))

main()

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

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

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

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

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

Solution (Python):
x = [int(input()) for i in range(2)]
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())
c=[1,2,3]
c.pop(c.index(a))
c.pop(c.index(b))
print(c[0])

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

print(*({"1", "2", "3"} - {A, B}))

Solution (Python):
x,y=map(int,open(0).read().split())
for i in range(1,4):
  if x==i or y==i:
    continue
  print(i)

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

a = int(input())
l.remove(a)

b = int(input())
l.remove(b)

print(l[0])

Solution (Python):
a = [input() for i in range(2)]
b = [int(s) for s in a]
print(6 - sum(b))

Solution (Python):

def main():
    a = int(input())
    b = int(input())
    print(6 - a - b)


if __name__ == "__main__":
    main()

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

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

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

s1 = {1, 2, 3}
s2 = set()
s2.add(A)
s2.add(B)
for i in s1 - s2:
    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())
print(6-A-B)

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

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

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

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

Solution (Python):
n = int(input())
m = int(input())
if n!=1 and m!=1:
    print(1)
elif n!=2 and m!=2:
    print(2)
else:
    print(3)

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())
ans=6
for i in range(1,4):
    if a==i or b==i:
            ans-=i
print(ans)

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

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

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

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

C=sorted([A,B])
ans=0
 
if C==[1,2]:
  ans=3
elif C==[1,3]:
  ans=2
else:
  ans=1
  
print(ans)

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

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

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

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):
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())
 
t = set([1, 2, 3])
s = set([a,b])
ans = t - s
print(list(ans)[0])

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

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

print(6-a-b)

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

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

Solution (Python):
ab = set([input() for _ in range(2)])
s = {'1', '2', '3'}
print(''.join(s-ab))

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

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

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

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

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

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

a_list.remove(a)
a_list.remove(b)

print(a_list[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())

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

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

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(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())
x=[1,2,3]
x.remove(a)
x.remove(b)
print(x[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):
def main():
    cands = {1, 2, 3}
    for _ in range(2):
        cands.discard(int(input()))
    print(cands.pop())


if __name__ == '__main__':
    main()

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

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

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

l=[0]*3
l[a-1]+=1
l[b-1]+=1
print(l.index(0)+1)

Solution (Python):
a = int(input())
b = int(input())
ans = list(filter(lambda x: x != a and x != b, [1, 2, 3]))
print(ans[0])

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

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

Solution (Python):
S = '123'
for i in range(2):
    tmp = input()
    S = S.replace(tmp, '')
print(S)

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

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

Solution (Python):


def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

flag1 = True
flag2 = True
flag3 = True

if a == 1:
    flag1 = False
elif a == 2:
    flag2 = False
elif a == 3:
    flag3 = False
    
if b == 1:
    flag1 = False
elif b == 2:
    flag2 = False
elif b == 3:
    flag3 = False
    
if flag1:
    print(1)
elif flag2:
    print(2)
else:
    print(3)

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

Solution (Python):
a = [int(input()) for i in range(2)]
if a[0] == 1:
  if a[1] == 2:
    my_result = 3
  else:
    my_result = 2
elif a[0] == 2:
  if a[1] == 1:
    my_result = 3
  else:
    my_result = 1
else:
  if a[1] == 1:
    my_result = 2
  else:
    my_result = 1
print(my_result)

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

for i in range(1,4):
    if i == A:
        continue
    elif i == B:
        continue
    else:
        ans = i
        break
print(ans)

Solution (Python):
A = int(input())
B = int(input())
C = {1,2,3}
D = {A, B}
print(*(C - D))

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

if '__main__' == __name__:
    resolve()

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())
for i in range(1, 4):
    if i in [A, B]:
        continue
    else:
        print(i)
        break

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

print(6 - A - B)

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

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

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

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

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

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

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

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 not in [a,b]:
        print(i)