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

Submission status: Accepted

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

a = input()
b = input()

ans.remove(a)
ans.remove(b)

print(ans[0])

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

Submission status: Accepted

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

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

print(list(ans)[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
i=0
j=0
A=int(input())
B=int(input())
ans=[1,2,3]
#print(ans)
for j in range(100):
 for i in range(3):
  if ans[i]!=A and ans[i]!=B:
      print(ans[i])
      sys.exit()

#    i=i+1
#    break
  #elif ans[i]==B:
#     i=i+1
#     break
#print(ans[i])
#sys.exit()

Submission status: Accepted

Solution code:
raw_input1 = input()
raw_input2 = input()

A = int(raw_input1)
B = int(raw_input2)

answers = [1,2,3]

answers.remove(A)
answers.remove(B)


for ans in answers:
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

answers = {1:True, 2:True, 3:True}
answers.pop(A)
answers.pop(B)
print(list(answers.keys())[0])

Submission status: Accepted

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

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

Q = [1,2,3]

for i in range(3):
    if Q[i] == A:
        Q[i] = 0
    
    elif Q[i] == B:
        Q[i] = 0

print(sum(Q))

Submission status: Accepted

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

Submission status: Accepted

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

ans = {"1","2","3"}
ans = set(ans)

ans.remove(A)
ans.remove(B)
a = 0

if "1" in ans:
    print("1")
else:
    a = 1
if "2" in ans:
    print("2")
else:
    a = 1
if "3" in ans:
    print("3")
else:
    a = 1

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__=='__main__':
    a=int(input())
    b=int(input())
    if a*b==2:
        print("3")
    elif a*b==3:
        print("2")
    elif a*b==6:
        print("1")

Submission status: Accepted

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

ans = 0
if (A == 1 and B == 2) or (A == 2 and B == 1):
    ans = 3
elif (A == 1 and B == 3) or (A == 3 and B == 1):
    ans = 2
elif (A == 2 and B == 3) or (A == 3 and B == 2):
    ans = 1

print(ans)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
n = [1, 2, 3]
n.remove(a)
n.remove(b)
print(n[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:
a = int(input())
b = int(input())
c = 2
if a == 1:
    if b == 2:
        c = 3
elif a == 2:
    if b == 1:
        c = 3
    else:
        c = 1
elif a == 3:
    if b == 2:
        c = 1
print(c)

Submission status: Accepted

Solution code:
import sys

s = set([int(input()), int(input())])
a = {1,2,3} - s

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

Submission status: Accepted

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

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

print(i[0])

Submission status: Accepted

Solution code:
n1 = int(input())
n2 = int(input())
 
#print(n1)
#print(n2)
 
if n1 == 1:
  if n2 == 2:
    print("3")
  else:
    print("2")
elif n1 == 2:
  if n2 == 1:
    print("3")
  else:
    print("1")
elif n1 ==3:
  if n2 == 1:
    print("2")
  else:
    print("1")

Submission status: Accepted

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

c = [1, 2, 3]

result = [i for i in c if i != a and i != b]

print(result[0])

Submission status: Accepted

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

if sum(arr) == 3: print(3)
if sum(arr) == 4: print(2)
if sum(arr) == 5: print(1)

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

Submission status: Accepted

Solution code:
n=[1,2,3]
n.remove(int(input()))
n.remove(int(input()))
print(n[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:
# ABC148 A

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

answer_set = [1, 2, 3]

answer_set.remove(A)
answer_set.remove(B)

print(answer_set[0])

Submission status: Accepted

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

m.pop(m.index(a))
m.pop(m.index(b))
print(m[0])

Submission status: Accepted

Solution code:
a = list(input().split())
b = list(input().split())

x = int(a[0]) + int(b[0])

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

Submission status: Accepted

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

ans.pop(ans.index(A))
ans.pop(ans.index(B))

print(ans[0])

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''

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

    ans = [1, 2, 3]
    ans.remove(A)
    ans.remove(B)
    print(ans[0])
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())
t=int(input())
list=[]
list.append(1)
list.append(2)
list.append(3)
list.remove(s)
list.remove(t)
print(*list)

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())
i = 1
while i<=3:
    if a!=i and b!=i:
        print(i)
        break
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num1 = int(input())
num2 = int(input())
numbers = [1,2,3]
new_numbers = [num for num in numbers if num != num1]
new_numbers_2 = [num for num in new_numbers if num != num2]
ans = new_numbers_2[0]
print(ans)

Submission status: Accepted

Solution code:
a,b=input(),input()
s=set("123")
s.discard(a)
s.discard(b)
print(s.pop())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input1 = int(input())
input2 = int(input())

ans_set = set([1,2,3]) - set([input1,input2])

print([ans for ans in ans_set][0])

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

Submission status: Accepted

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

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

print(6 - (a+b))

Submission status: Accepted

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

for number in num:
    if number == a or number == b:
        continue
    print(number)

Submission status: Accepted

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

list=[1,2,3]
list.remove(a)
list.remove(b)
for i in list:
    print(i)

Submission status: Accepted

Solution code:
answers=list(range(1,4))
answers.remove(int(input()))
answers.remove(int(input()))
print(answers[0])

Submission status: Accepted

Solution code:
S = []
for _ in range(2):
    S.append(int(input()))  # S += [input()] とも書ける

if {S[0],S[1]} == {1,2}:
    print(3)
elif {S[0],S[1]}=={2,3}:
    print(1)
elif {S[0],S[1]}== {3,1}:
    print(2)

Submission status: Accepted

Solution code:
ab = []

ab.append(int(input()))
ab.append(int(input()))

def solve():
  if 1 not in ab:
    print(1)
  elif 2 not in ab:
    print(2)
  
  elif 3 not in ab:
    print(3)

def main():
  solve()

if __name__ == "__main__":
  main()

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=1
for i in range(3):
  if a==c or b==c:
    c=c+1
  else:
    print(c)
    break

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)

def main():
    a = int(input())
    b = int(input())
    for i in range(1, 4):
        if not (i == a or i == b):
            print(i)
            exit()


    
    

        


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = [1,2,3]
n = 0
m = 0
for i in range(3):
    if a == c[i]:
        n = a
    if b == c[i]:
        m = b
        
s = sum(c)
print(s-n-m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
ans=int(0)
l=[a, b]
l.sort()

if l[0]==2:
    ans=1

if l[0]==1 and l[1]==3:
    ans=2
if l[1]==2:
    ans=3


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
print(({1,2,3} - {A,B}).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())
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()),int(input())]
if 1 not in a:
    print(1)
elif 2 not in a:
    print(2)
else:print(3)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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

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

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

Submission status: Accepted

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

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import unittest


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


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


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


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


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


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


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


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


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()

Submission status: Accepted

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

c = a + b

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

print(ans)

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 math
import sys

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

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())
ab = [a,b]
if 3 not in ab:
    print(3)
elif 2 not in ab:
    print(2)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

main()

Submission status: Accepted

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(int(answer[0]))

Submission status: Accepted

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

lst = [1, 2, 3]
# print(lst.index(a), lst.index(b))
lst.remove(a)
lst.remove(b)
print(lst[0])

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

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

Submission status: Accepted

Solution code:

s1 = input()
s2 = input()

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

ans = ABC - {s1, s2}

for i in ans:
	print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

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

Submission status: Accepted

Solution code:
import sys

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

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

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

C=A+B
if C<=3:
    print(C)
else:
    print(abs(A-B))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(str)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(*li)

Submission status: Accepted

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

Submission status: Accepted

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

print(6-n-m)

Submission status: Accepted

Solution code:
list=["1","2","3"]

A=input()
B=input()

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

print(list[0])

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
a = input()
b= input()
array = ['1','2','3']
for s in range(len(array)-1, -1 , -1):
    if a == array[s] or b == array[s]:
        del array[s]
print(array[0])

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:
nums = [1,2,3]
a = int(input())
b = int(input())
c = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

c = 6 - a - b

print(c)

Submission status: Accepted

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

ans = 6 - (A+B)

print(ans)

Submission status: Accepted

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

    lst = [1,2,3]

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

for i, v in enumerate(a):
    if v:
        print(i+1)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
x=[a,b]
if 1 not in x:
    print(1)
elif 2 not in x:
    print(2)
else:
    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())
c = [1, 2, 3]
c.remove(a)
c.remove(b)

print(c[0])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(lis[0])