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

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:
can = set('1 2 3'.split())
can.remove(input())
can.remove(input())
print(can.pop())

Submission status: Accepted

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

list = [1, 2, 3]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from fractions import gcd
from string import ascii_uppercase as ABC
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))
A = int(input())
B = int(input())

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

Submission status: Accepted

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

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

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

print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

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 [1, 3] and B in [1, 3]:
    print(2)
else:
    print(1)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
print([x for x in [1,2,3] if not x in [A, B]][0])

Submission status: Accepted

Solution code:
a=['1','2','3']

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


print(*a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
res = list(set([1, 2, 3]) - set([A, B]))
print(res[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)
else:
    print(1)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

    print(answer[0])


solve()

Submission status: Accepted

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

l = [1,2,3]

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

Submission status: Accepted

Solution code:
# 1行目の入力を数値として扱う
A = int(input())
# 2行目の入力を数値として扱う
B = int(input())

# AでもBでもない
res = 6 - A - B

# 答えの出力
print(res)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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



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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = input()
x = ["1","2","3"]
x.remove(a)
x.remove(b)
print(''.join(x))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import math


debug = False

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

def parse_input(lines_as_string = None):

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

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

    return (a, b)


def solve(a, b):

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

    return answers[0]


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

if __name__ == '__main__':

    main()

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

for x in ANS:
    print(x)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

C = A + B

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(c))

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

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

print(result)

Submission status: Accepted

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



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

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

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
ans_list = [1,2,3]
print([i for i in ans_list if (i!=a and i!=b)][0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())
S = A+B
if(S == 3):
  print('3')
elif(S == 4):
  print('2')
else:
  print('1')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    A, B = int(input()), int(input())
    choice = [1, 2, 3]
    choice.remove(A)
    choice.remove(B)
    print(choice[0])


if __name__ == "__main__":
    main()

Submission status: Accepted

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

List = [1, 2, 3]
List.remove(a)
List.remove(b)
print(*List)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
if (A == 1and 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:
#!python3.4.3

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:
def main():
    answers = {1, 2, 3}
    A = {int(input())}
    B = {int(input())}

    answers.difference_update(A)
    answers.difference_update(B)
    for v in answers:
        print(v)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]


answer = set("1 2 3".split())
a = fetch_one_line()
b = fetch_one_line()

print(list(answer - set(a) - set(b))[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:
a = int(input())
b = int(input())
tl = [a,b]
t = a * b
if t == 3:
    print(2)
elif t == 6:
    print(1)
elif t == 2:
    print(3)

Submission status: Accepted

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

l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if batsu == [1, 2]:
    print(3)
elif batsu == [1, 3]:
    print(2)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=int(input())
W=int(input())
if S+W==3:
  print(3)
elif S+W==4:
  print(2)
elif S+W==5:
  print(1)

Submission status: Accepted

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

Ans = Ans - A - B

print(Ans)

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:
# coding: utf-8

array = [1, 2, 3]
input1 = int(input())
input2 = int(input())
array.remove(input1)
array.remove(input2)
print(array[0])

Submission status: Accepted

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

p = set()
p.add("1")
p.add("2")
p.add("3")

p.remove(a)
p.remove(b)

print(p.pop())

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

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
lab=[A,B]
for i in range(3):
    if not i+1 in lab:
        print(i+1)
        break

Submission status: Accepted

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

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

answers.remove(a)
answers.remove(b)

print(answers[0])

Submission status: Accepted

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

ans = [1,2,3]

if a in ans:
    ans.remove(a)
if b in ans:
    ans.remove(b)
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

num_list = [1,2,3]

num_list.remove(a)
num_list.remove(b)

answer = num_list[0]
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

numbers = [1, 2, 3]

for i in numbers:
  if i != a and i != b:
    print(i)
    sys.exit()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

print(ans[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
g=int(input())
k=int(input())
c=g+k
print(6-c)

Submission status: Accepted

Solution code:
A = input()
B = input()
cond_ans = ["1","2","3"]
ans = set(cond_ans) - set([A,B])
print(list(ans)[0])

Submission status: Accepted

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

lst = [A, B]
lst.sort()

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
tmp = [1,2,3]

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

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue
#import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline-------------------------------------------- 
    A = int(input())
    B = int(input())
    L = [1,2,3]
    for i in L:
        if i != A and i != B:
            print(i)


if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def q1(a,b):
    tmplist = [1,2,3]
    del tmplist[tmplist.index(a)]
    del tmplist[tmplist.index(b)]
    return tmplist[0]

print(q1(int(input()),int(input())))

Submission status: Accepted

Solution code:
import sys

def solve(a, b):
    for ans in [1, 2, 3]:
        if ans != a and ans != b:
            print(ans)
            break


if __name__ == '__main__':
    a = int(sys.stdin.readline().strip())
    b = int(sys.stdin.readline().strip())
    solve(a, b)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
c=[1,1,1]
c[a-1]=0
c[b-1]=0

print(c.index(1)+1)

Submission status: Accepted

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

if m==1 and n==2:
    print(3)
elif m==1 and n==3:
    print(2)
elif m==2 and n==1:
    print(3)
elif m==3 and n==1:
    print(2)
elif m==2 and n==3:
    print(1)
else:
    print(1)

Submission status: Accepted

Solution code:
from __future__ import print_function

import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

# import math
# import string
# import fractions
# from fractions import Fraction
# from fractions import gcd

# def lcm(n,m):
#     return int(n*m/gcd(n,m))

# import re
# import array
# import copy
# import functools
# import operator

# import collections
# import itertools
# import bisect
# import heapq


# from heapq import heappush
# from heapq import heappop
# from heapq import heappushpop
# from heapq import heapify
# from heapq import heapreplace

# from queue import PriorityQueue as pq

# def reduce(p, q):
#     common = fractions.gcd(p, q)
#     return (p//common , q//common )
# # from itertools import accumulate
# # from collections import deque

# from operator import mul
# from functools import reduce

# def combinations_count(n, r):
#     r = min(r, n - r)
#     numer = reduce(mul, range(n, n - r, -1), 1)
#     denom = reduce(mul, range(1, r + 1), 1)
#     return numer // denom

# import random

def main():
    a = int(input().strip())
    b = int(input().strip())
    s=set([1,2,3])
    s.remove(a)
    s.remove(b)
    for x in s:
        print(x)
        return
if __name__ == '__main__':
    main()

Submission status: Accepted

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

a = int(input().strip())
b = int(input().strip())
nums.remove(a)
nums.remove(b)

print(nums[0])

Submission status: Accepted

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

Submission status: Accepted

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

ary = [False] * 3

ary[a-1] = True
ary[b-1] = True

for i in range(3):
  if ary[i]:
    continue
  print(i+1)
  break

Submission status: Accepted

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

ls = [1,2,3]

del ls[ls.index(A)]
del ls[ls.index(B)]

print(ls[0])

Submission status: Accepted

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

answer = '123'
answer = answer.replace(A[0], '')
answer = answer.replace(B[0], '')

print(answer)

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

Submission status: Accepted

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase
ts=time.time()
#sys.setrecursionlimit(10**5)
input=lambda: sys.stdin.readline().rstrip()

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True
#for i in range(n):

ans=0

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

print(*ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC148 A - Round One

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

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

else:
    if B==1:
        print(str(2))
    elif B==2:
        print(str(1))

Submission status: Accepted

Solution code:
# ABC148 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
a=ni()
b=ni()

ans=[1,1,1]

ans[a-1]=0
ans[b-1]=0

for i,aa in enumerate(ans):
    if aa==1:
        print(i+1)

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

arr.remove(A)
arr.remove(B)

print(arr[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
goukei = a + b
if goukei == 3:
    print(3)

if goukei == 4:
    print(2)

if goukei == 5:
    print(1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
b = int(input())
c=6-(a+b)
print (c)