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



Sample input:
3
1


Sample output:
2

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
list = [1,2,3]
list1 = []
list1.append(A)
list1.append(B)
for i in range(0,3):
    if list[i] not in list1:
        print(i+1)
    else:
        pass

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(2)]
b = 6
for j in a:
    b = b - j
print(b)

Submission status: Accepted

Solution code:
choices = {1, 2, 3}
for _ in range(2):
    choices.remove(int(input()))
print(*choices)

Submission status: Accepted

Solution code:
a,b=map(int,open(0))
print(6-a-b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l=[1,2,3]
del(l[l.index(int(input()))])
del(l[l.index(int(input()))])
print(l[0])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(A: int, B: int):
    x = {1,2,3}-{A,B}
    print(x.pop())
    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))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
I = map(int, open(0))
print(6 - sum(I))

Submission status: Accepted

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

x = 6 - A - B
print(x)

Submission status: Accepted

Solution code:
res = {1,2,3}
a = int(input())
b = int(input())
res.discard(a)
res.discard(b)
print(res.pop())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

print(6 - a - b)

Submission status: Accepted

Solution code:
ans=0
ans+=int(input())
ans+=int(input())
print(6-ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n =int(input())
m = int(input())
print(6-n-m)

Submission status: Accepted

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

Submission status: Accepted

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

problem = set([1,2,3])

print((problem - set([a,b])).pop())

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

a = ri()
b = ri()
print(6 - a - b)

Submission status: Accepted

Solution code:
print(*{1,2,3}-set(map(int,open(0))))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
abc = [1,2,3]
for i in range(3):
  if abc[i] == a or abc[i] == b:
    continue
  else:
    print(i+1)
    break

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    ab = [A,B]
    if 1 not in ab:
        print(1)
    elif 2 not in ab:
        print(2)
    elif 3 not in ab:
        print(3)

    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))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
for i in range(3):
    if((i+1==a or i+1==b)==False):
        print(i+1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans,res  = [1,2,3],[]

res.append(int(input()))
res.append(int(input()))

answer = [x for x in ans if x not in res]
print(answer.pop())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

x = int(input())
z = int(input())

y = [1,2,3]

y.remove(x)
y.remove(z)

print(y[0])

Submission status: Accepted

Solution code:
x = int(input())
y = int(input())
lst = [1,2,3]
lst.remove(x)
lst.remove(y)
print(*lst)

Submission status: Accepted

Solution code:
ans = [1,2,3]
in_1 = int(input())
in_2 = int(input())

ans.remove(in_1)
ans.remove(in_2)
for i in ans:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
l=[a,b]
for i in [1,2,3]:
  if(i not in l):
    print(i)

Submission status: Accepted

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

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

print(x.pop(0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_a = int(input())
input_b = int(input())

if (input_a == 1):
    if(input_b == 2):
        print(3)
    else:
        print(2)
elif (input_a == 2):
    if(input_b == 1):
        print(3)
    else:
        print(1)
else:
    if(input_b == 1):
        print(2)
    else:
        print(1)

Submission status: Accepted

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

list = [1,2,3]
list.pop(list.index(int(A)))
list.pop(list.index(int(B)))
print(list[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

A = list(map(int , input().split()))
B = list(map(int , input().split()))

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

Submission status: Accepted

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

c = a+b

print(6-c)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
x=[0 for _ in range(3)]
x[a-1]=1
x[b-1]=1
for i in range(3):
  if x[i]==0:
    print(i+1)
    break

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

Solution code:
A = input()
a = int(A)
B = input()
b = int(B)
c = a + b

if c == 3:
    print('3')
if c == 5:
    print('1')
if c == 4:
    print('2')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
C = {1, 2, 3}
D = {A, B}
E = C - D
print(E.pop())

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ab = [a, b]
answer_list = [1, 2 ,3]
for answer in answer_list:
    if not answer in ab:
        print(answer)

Submission status: Accepted

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

c = 6 - a- b
print (c)

Submission status: Accepted

Solution code:
import sys
def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(var):
	print(var, file=sys.stderr)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
# from math import gcd
# from collections import defaultdict as dd, Counter
# from bisect import bisect_left as bl, bisect_right as br

a = []
a.append(I()[0])
a.append(I()[0])
for i in range(1, 4):
	if i not in a:
		print(i)
		break

Submission status: Accepted

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

    print(6-a-b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A,B = map(int,read().split())
x = 6 - A - B
print(x)

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    ret = [1, 2, 3]
    A = input()
    B = input()
    ret.remove(int(A))
    ret.remove(int(B))
    print(ret[0])

Submission status: Accepted

Solution code:
code1 = int(input())
code2 = int(input())
if code1==1 and code2==2:
  print(3)
elif code1==1 and code2==3:
  print(2)
elif code1==2 and code2==3:
  print(1)
elif code1==2 and code2==1:
  print(3)
elif code1==3 and code2==1:
  print(2)
else:
  print(1)

Submission status: Accepted

Solution code:
c = [1,2,3]

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

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

print(c[0])

Submission status: Accepted

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

ans = [1,2,3]

ans.remove(A)
ans.remove(B)

print(ans[0])

Submission status: Accepted

Solution code:
li=set([1,2,3])
a= int(input())
b= int(input())
req=set([a,b])
ans = li-req
for i in ans:
  print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = [1, 2, 3]

answer = 0

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

print(answer)

Submission status: Accepted

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

cnt_list = [0] * 3

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(6/a/b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = input()
B = input()
X = ["1","2","3"]
X.remove(A)
X.remove(B)
print(str(X[0]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

l = [1,2,3]

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

print(l[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

li=[1,2,3]

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

print(li[0])

Submission status: Accepted

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

    return A, B


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


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

Submission status: Accepted

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


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

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


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

Submission status: Accepted

Solution code:
def main():
    A = int(input())
    B = int(input())
    if (A==1 and B==2) or (A==2 and B==1):
        print(3)
    elif (A==1 and B==3) or (A==3 and B==1):
        print(2)
    else:
        print(1)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

#+++++

#a,b = map(int, input().split())
#n = int(input().strip())
s=int(input().strip())
t=int(input().strip())
a=[1,2,3]
a.remove(s)
a.remove(t)
print(a[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
if (a,b > 0 and a,b <= 3):
    if (a == 1 and b == 2) or (a == 2 and b == 1):
        print(3)
    elif (a == 1 and b == 3) or (a == 3 and b == 1):
        print(2)
    elif (a == 2 and b == 3) or (a == 3 and b == 2):
        print(1)
else:
    pass

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(C)

Submission status: Accepted

Solution code:
import sys
bbn=1000000007
	
#+++++
		
def main():
	rets=[1,2,3]
	a = int(input())
	b = int(input())
	rets.pop(rets.index(a))
	rets.pop(rets.index(b))

	print(rets[0])
	
	
#+++++
isTest=False

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

goukei = a + b 

print(6-a-b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = [1,2,3]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("".join(Ans))

Submission status: Accepted

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

C = 6-A-B
print(C)

Submission status: Accepted

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

print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

temp = a+b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
 
ans = ""
 
if A == 1 and B == 2:
  ans = "3"
elif A == 1 and B == 3:
  ans = "2"
elif A == 2 and B == 1:
  ans = "3"
elif A == 2 and B == 3:
  ans = "1"
elif A == 3 and B == 1:
  ans = "2"
elif A == 3 and B == 2:
  ans = "1"
  
print(ans)

Submission status: Accepted

Solution code:
import math
import fractions

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

    # divisors.sort()
    return divisors

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

#a = list(map(int, input().split()))

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

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
li = [1,2,3]
for i in li:
	if i != A and i != B:
		print(i)

Submission status: Accepted

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

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

print(list_res[0])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C=2
    if B==2:
        C=1

print(C)

Submission status: Accepted

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


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


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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l = [1,2,3]

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

print(l[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# list = list(map(int, input().split()))


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

ans = 0
sum = A+B


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(p[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())						# 5
b = int(input())						# 5

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

Submission status: Accepted

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

Submission status: Accepted

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

all = [1,2,3]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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



print(6-(a+b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

print(choices.pop())

Submission status: Accepted

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

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

print(num[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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