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

Submission status: Accepted

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

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

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

print(l.pop(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)
elif A==3:
    if B==1:
        print(2)
    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 == 1 and b == 2) or (a == 2 and b == 1):
    print(3)
elif (a == 2 and b == 3) or (a == 3 and b == 2):
    print(1)
elif (a == 3 and b == 1) or (a == 1 and b == 3):
    print(2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(3):
    if((i+1 != a) and (i+1 != b)):
        c = i+1
    
print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# print('input >>')
a = int(input())
b = int(input())

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

ans = li - set([a,b])

# print('-----output-----')

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
def superpower(A,B):
    if A != 1 and B != 1:
        return 1
    elif A != 2 and B != 2:
        return 2
    else:
        return 3
print(superpower(A,B))

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
s = set()
s.add(A)
s.add(B)
for i in (1,2,3):
    if i not in s:
        print(i)
        exit()

Submission status: Accepted

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

print(min((set([1, 2, 3]) - set([a, b]))))

Submission status: Accepted

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

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

Submission status: Accepted

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

c = a + b

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

Submission status: Accepted

Solution code:
s = input().split()
a=int(s[0])
s = input().split()
b = int(s[0])
print(6-a-b)

Submission status: Accepted

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

c = 6 - a - b
print(str(c))

Submission status: Accepted

Solution code:
A=set()
A.add(int(input()))
A.add(int(input()))
if 1 not in A:
    print(1)
elif 2 not in A:
    print(2) 
else:
    print(3)

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


main()

Submission status: Accepted

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

list = []
list.append(a)
list.append(b)

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

Submission status: Accepted

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

R=[1,1,1]
R[A-1]=0
R[B-1]=0

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

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:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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())
c = [a, b]
if 1 not in c:
  print(1)
elif 2 not in c:
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

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

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

print(ans)

Submission status: Accepted

Solution code:
import math

a, b = [int(input()) for i in range(2)]
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:
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

a=INT()
b =INT()
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 < 3 and B < 3:
    print(3)
else:
    print(abs(A-B))

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

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

Submission status: Accepted

Solution code:
input_data1 = int(input())
input_data2 = int(input())

answer = [1, 2, 3]
result = 0

for miss in answer:
    if(miss == input_data1 or miss == input_data2):
        pass
    else:
        result = miss

print(result)

Submission status: Accepted

Solution code:
a=input()
b=input()
anc = ['1','2','3']

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

Submission status: Accepted

Solution code:
def main():
    ab = [int(input()) for _ in range(2)]
    if not 1 in ab:
        return 1
    if not 2 in ab:
        return 2
    else:
        return 3


print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
l=[0]*2
l[0]=A
l[1]=B
if 3 not in l:
    print(3)
elif 2 not in l:
    print(2)
else:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

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

A = int(input())
B = int(input())
print(6-A-B)

Submission status: Accepted

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

s = 6-a-b
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

v = [0]*4
v[a] = 1
v[b] = 1
for i in range(1, 4):
	if v[i] == 0:
		print(i)

Submission status: Accepted

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

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

print(kotae[0])

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, b = int(input()), 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())
ls = [1, 2, 3]
ls[A - 1] = 0
ls[B - 1] = 0
for i in ls:
	if i != 0:
		print(i)

Submission status: Accepted

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

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()) for i in range(2)]

if 1 not in a :
    print(1)
elif 2 not in a:
    print(2)
else:
    print(3)

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

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

Submission status: Accepted

Solution code:
data1 = int(input())
data2 = int(input())
if (data1 == 1 and data2 == 2) or (data1 == 2 and data2 == 1):
    print(3)
elif (data1 == 1 and data2 == 3) or (data1 == 3 and data2 == 1):
    print(2)
elif (data1 == 2 and data2 == 3) or (data1 == 3 and data2 == 2):
    print(1)

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:
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	A = []
	for _ in range(2):
		A.append(INT())
	
	#print(A)

	ans = [1, 2, 3]
	for a in A:
		if a in ans:
			ans.remove(a)
	
	print(ans[0])

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    AB = [int(stdin.readline().rstrip()) for _ in range(2)]
    for i in range(1, 4):
        if i not in AB:
            print(i)
            break


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
A_B = {A, B}

ans = {1, 2, 3}
a = ans - set([A, B])

print(list(a)[0])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

targets = [a, b]
if 1 in targets:
    pass
else:
    print(1)
if 2 in targets:
    pass
else:
    print(2)
if 3 in targets:
    pass
else:
    print(3)

Submission status: Accepted

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

#単入力
a=int(input())

b=int(input())

l=[]
l.append(a)
l.append(b)

d=[1,2,3]

d.remove(a)
d.remove(b)

print(d[0])

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

l = [i for i in range(1, 4)]

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A = int(input())
    B = int(input())
    ans = {A, B} ^ {1, 2, 3}
    print(*ans)


main()

Submission status: Accepted

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

ans=C-(A+B)
print(ans)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
if (A == 1 and B == 2) or (B == 1 and A == 2):
    print(3)
elif (A == 1 and B == 3) or (B == 1 and A == 3):
    print(2)
elif (A == 2 and B == 3) or (B == 2 and A == 3):
    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())
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:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    A = INT()
    B = INT()

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

input_line = [input() for i in range(2)]

data = [0 for i in range(2)]

data[0] = int(input_line[0])
data[1] = int(input_line[1])

print(6-data[0]-data[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A = read_a_int()
B = read_a_int()

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

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

L = [1,2,3]

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

d=[a,b]
a=[1,2,3]
d.sort()
for i in range(2):
  a.remove(d[i])
print(a[0])

Submission status: Accepted

Solution code:
A = input()
B = 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)
else:
    print(1)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(1 if n+b==5 else 2 if n+b==4 else 3)

Submission status: Accepted

Solution code:
test = ""
#test = \
"""
3
1
"""
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
    
    
a = int(input2())
b = int(input2())
print(6-a-b)

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

Submission status: Accepted

Solution code:
a, b = map(int, open(0).read().split())

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

print(l[0])

Submission status: Accepted

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

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)

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

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

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

Submission status: Accepted

Solution code:
# import numpy as np
import sys
input = sys.stdin.readline

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

test = [1,2,3]

test.remove(A)
test.remove(B)

print(test[0])

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

A = inp()
B = inp()
S = {1,2,3} - {A,B}
print(min(S))

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

if __name__ == '__main__':
    A = int(stdin.readline().rstrip())
    B = int(stdin.readline().rstrip())

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

Submission status: Accepted

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

a = input()
b = 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()
r = '123'.replace(a, '').replace(b, '')
print(r)

Submission status: Accepted

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

Submission status: Accepted

Solution code:
import sys

str = sys.stdin.readlines()

list = [int(str[0]), int(str[1]) ]

if 1 not in list:
    print(1)
elif 2 not in list:
    print(2)
else:
    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:
a=int(input())
b=int(input())
que=[a,b]
ans=[i for i in range(1,4) if i not in que]
print(ans[0])

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())
l = [1,2,3]
del l[l.index(A)]
del l[l.index(B)]
print(*l)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections
import math
import operator as op
from functools import reduce
import numpy as np
import math
import bisect


def main():
    A = int(input())
    B = int(input())
    if A > B:
        A, B = B, A
    # A <= B
    if A == 1 and B == 2:
        print(3)
    elif A == 1 and B == 3:
        print(2)
    elif A == 2 and B == 3:
        print(1)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = int(input())
b = int(input())

a = [1,2,3]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
write = sys.stdout.write
def ii(): return int(readline())
def mi(): return map(int, readline().rstrip().split())
def li(): return list(readline().rstrip())
def lmi(): return list(map(int, readline().rstrip().split()))
def end(*arg): print(*arg); sys.exit()
# template


def main():
    A = ii()
    B = ii()
    print(6 - A - B)
    return


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import collections
#sys.setrecursionlimit(100000)

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


print(6-a-b)

Submission status: Accepted

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

answers = [1, 2, 3]

answers.remove(A)
answers.remove(B)
print(answers[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

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())
s = {1,2,3}
s.remove(a)
s.remove(b)
for x in s:
    print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

result.remove(A)
result.remove(B)

print(result[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:
li = [1,2,3]
for i in range(2):
    li.remove(int(input()))
print(*li)

Submission status: Accepted

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

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

choice.remove(A)
choice.remove(B)

ans = choice.pop()
print(ans)

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

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

a, b = map(int, read().split())
ans = [1, 2, 3]
tmp = [a, b]
ans = set(ans) - set(tmp)

print(list(ans)[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

abc_list = [a,b]

if not(1 in abc_list):
    print(1)
if not(2 in abc_list):
    print(2)
if not(3 in abc_list):
    print(3)

Submission status: Accepted

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

ch = {'1', '2', '3'}

ch.remove(A)
ch.remove(B)
print(ch.pop())

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

Submission status: Accepted

Solution code:
import sys


def main():
    # input = sys.stdin.readline
    a = int(input())
    b = int(input())

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

    print(candidates[0])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
C = [1 for _ in range(3)]
C[int(input())-1] = 0
C[int(input())-1] = 0

for i in range(3):
    if C[i] == 1:
        print(i+1)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inp1 = int(input())
inp2 = int(input())

if(inp1 != 1 and inp2 != 1):
  	print(str(1))

if(inp1 != 2 and inp2 != 2):
  	print(str(2))

if(inp1 != 3 and inp2 != 3):
	print(str(3))

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:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())

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

X = [1, 2, 3]

X.remove(A)
X.remove(B)

print(X[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 != 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:
# -*- coding:utf-8 -*-
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*b==2:
  print(3)
elif a*b==3:
  print(2)
else:
  print(1)

Submission status: Accepted

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

an = A + B

print(6-an)

Submission status: Accepted

Solution code:
*L,  = [list(map(int, s.split())) for s in open(0)]
A, B = L[0][0], L[1][0]
ans = [1, 2, 3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

s = set([a,b])
res = t-s
print(list(res)[0])

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)