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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main():
    cands = {1, 2, 3}
    for _ in range(2):
        cands.discard(int(input()))
    print(cands.pop())


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

flag1 = True
flag2 = True
flag3 = True

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
        ans = i
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(6-a-b)

Submission status: Accepted

Solution code:
# abc148_a.py
# https://atcoder.jp/contests/abc148/tasks/abc148_a

# A - Round One /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# 高橋君はペーパークイズを解いています。高橋君はすらすらと解いていき、残すは最終問題のみとなりました。
# この問題は、答えが 1,2,3のいずれかである 3択問題です。
# 高橋君は超能力によって、Aと Bが誤答であることがわかりました。
# この問題の答えを出力してください。

# 制約
#     A,Bは 1,2,3のいずれか
#     Aと Bは異なる

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A
# B

# 出力
# 答えを出力せよ。

# 入力例 1
# 3
# 1

# 出力例 1
# 2

# 1,2,3のうち、3 でも 1 でもないのは 2です。

# 入力例 2
# 1
# 2

# 出力例 2
# 3


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    A = int(lines[0])
    B = int(lines[1])
    # N, M = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].split())))

    result = 6 - A - B

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3', '1']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['1', '2']
        lines_export = [3]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
L=[int(input()),int(input())]
if not 1 in L:
  print(1)
elif not 2 in L:
  print(2)
else:
  print(3)

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)

Submission status: Accepted

Solution code:
print(int(input())^int(input()))

Submission status: Accepted

Solution code:
print(*set([input(),input()])^set([*'123']))

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
C = [A, B]

for i in [1, 2, 3]:
    if i not in C:
        print(i)

Submission status: Accepted

Solution code:
s = [0,1,2,3]
s[int(input())] = 0
s[int(input())] = 0
print(sum(s))

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    A = int(input())
    B = int(input())
    C = list(set([1, 2, 3]) - set([A, B]))
    print(C[0])

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
print(int(input()) ^ int(input()))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

array.pop(array.index(A))
array.pop(array.index(B))
print(*array)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(6-a-b)

Submission status: Accepted

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

numbers.remove(a)
numbers.remove(b)

print(numbers[0])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
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.discard(A)
ans.discard(B)
print(*ans)

Submission status: Accepted

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

tab=[1,2,3]

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

for j in range(3):
    if tab[j]!=0:
        print(tab[j])

Submission status: Accepted

Solution code:
A,B=int(input()),int(input())
print(list({1,2,3}-{A,B})[0])

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    b = int(input())
    if a == 1 and b == 2 or a == 2 and b == 1:
        print(3)
    elif a == 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)
         
if __name__ == '__main__':
    main()

Submission status: Accepted

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

c =6
print(c-A-B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
answer = [True] * 3

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

answer[a - 1] = False
answer[b - 1] = False

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
d = {}
d[a] = True
d[b] = True
for i in range(1, 4):
  if i not in d:
    print(i)

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)

Submission status: Accepted

Solution code:
import os, sys, re, math

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

print(6 - A - B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from sys import exit
def main():
  A = int(input())
  B = int(input())
  
  ans = [1,2,3]
  
  ans.remove(A)
  ans.remove(B)
  
  print(str(ans).replace('[', '').replace(']', ''))
  
  
main()

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
l=[]
l.append(a)
l.append(b)
if 1 not in l:
  print(1)
elif 2 not in l:
  print(2)
else:
  print(3)

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

l = {1, 2, 3}
m = {a, b}
ans = list(l ^ m)

print(ans[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def roundone(a, b):

    abc = "123"

    return abc.replace(a, "").replace(b, "")

def main():
    a = str(input())
    b = str(input())
    print(roundone(a, b))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

list.remove(a)
list.remove(b)

print(*list)

Submission status: Accepted

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

abc = {1, 2, 3}
ab = {A, B}
print(list(abc-ab)[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 == 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())
print(3-(a+b)%3)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
SET = set({1,2,3})
SET.remove(A)
SET.remove(B)
for e in SET:
    print(e)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(6-sum([int(input()) for i in range(2)]))

Submission status: Accepted

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A = int(readline())
B = int(readline())
AB = []
AB.append(A)
AB.append(B)
S = [1,2,3]
for i in range(3):
    if S[i] not in AB:
        print(S[i])
        sys.exit()

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:
print (6 - int(input()) - int(input()))

Submission status: Accepted

Solution code:
arr=[0,0]
arr[0] = int(input())
arr[1] = int(input())

if 1 not in arr:
    print('1')
elif 2 not in arr:
    print('2')
elif 3 not in arr:
    print('3')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

a = k()
b = k()
p = []

p.append(a)
p.append(b)
for i in range(1,4):
    if i not in p:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = sorted([int(input()), int(input())])
print(3 if s == [1, 2] else (2 if s == [1, 3] else 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')
if (a==1 and b==3) or (a==3 and b==1):
    print('2')
if (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(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:
a = int(input())
b = int(input())
s1 = {1,2,3}
s2 = {a,b}
ans = s1 - s2
print(*ans)

Submission status: Accepted

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

d = {1:0,2:0,3:0}

d[a] += 1
d[b] += 1

for k,v in d.items():
  if v==0: print(k)

Submission status: Accepted

Solution code:
L = []
L.append(int(input()))
L.append(int(input()))

for i in [1,2,3]:
  if i not in L:
    print(i)

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a = int(input())
b = int(input())
s = set(range(1,4))
s.remove(a)
s.remove(b)
print(s.pop())

Submission status: Accepted

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

A = int(input())
B = int(input())
print(list({1,2,3}-{A,B})[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 ==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:
li=[1,2,3]
li.pop(li.index(int(input())))
li.pop(li.index(int(input())))
print(li[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
result = {1, 2, 3}

result.discard(int(input()))
result.discard(int(input()))

print(result.pop())

Submission status: Accepted

Solution code:
# from collections import Counter, defaultdict
# n = int(input())
# li = list(map(int, input().split()))
# n = int(input())
# a, b, c = map(int, input().split())
# d = defaultdict(lambda: 0)
s = set([1, 2, 3])
s.discard(int(input()))
s.discard(int(input()))
print(*s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A = str(input())
B = str(input())
ans = [str(i) for i in range(1,4)]

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

Submission status: Accepted

Solution code:
def main():
    s=set('123')
    a=int(input())
    b=int(input())
    s.remove(str(a))
    s.remove(str(b))
    print(s.pop())

main()

Submission status: Accepted

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

Submission status: Accepted

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

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())
ans=[1,2,3]
for a in ans:
    if a!=A and a!=B:
        print(a)

Submission status: Accepted

Solution code:
a,b=map(int,open(0).read().split())
if a+b==3:
  print(3)
elif a+b==5:
  print(1)
else:
  print(2)

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:
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:
x = int(input())
y = int(input())
print(6 - x - y)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = int(input()), 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())
if a+b==4:
    ans=2
elif a+b==3:
    ans=3
else:
    ans=1
print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A = int(readline())
    B = int(readline())
    
    if A > B:
        A,B= B, A
    
    if A == 1:
        if B == 2:
            print('3')
        else:
            print('2')
    else:
        print('1')
    
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Vicfred
# https://atcoder.jp/contests/abc148/tasks/abc148_a
# implementation
A = int(input())
B = int(input())

print(6-A-B)

Submission status: Accepted

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

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())
v=[1,2,3]
for i in v:
    if a!=i and b!=i:
        print(i)
        break

Submission status: Accepted

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

print(6 - A - B)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
print(6-eval(input()+"+"+input()))

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("{}".format(6 - (A + B)))

Submission status: Accepted

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

Submission status: Accepted

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

print(6-(x+y))

Submission status: Accepted

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

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

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

print(*l)

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

num_list = [1,2,3]

num_list.remove(A)
num_list.remove(B)

print(num_list[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
ans = A+B
if ans == 3:
  print(3)
elif ans == 4:
  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:
input_line = set([])
input_line.add(int(input()))
input_line.add(int(input()))

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

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

ret = 1
for i in range(1, 3+1):
    if i != a and i != b:
        ret = i
        break

print("{}".format(ret))

Submission status: Accepted

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

se = set(["1","2","3"])

a = se-set([A,B])

print(a.pop())

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(""))
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)
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:
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:
arr = [1,2,3]
one = int(input())
two = int(input())

arr[one-1] = 0
arr[two-1] = 0

for i in arr:
  if i > 0: print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l.remove(int(input()))
l.remove(int(input()))

print(l[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 148 A

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

Submission status: Accepted

Solution code:
a =sorted( [int(input()) for i in range(2)])
print("1" if a == [2,3] else "2" if a == [1,3] else "3")

Submission status: Accepted

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

for x in range(1, 4):
    if x not in [A, B]:
        print(x)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#<148>
#<A>
a = int(input())
b = int(input())
c = [1,2,3]
c.remove(a)
c.remove(b)
print("".join(map(str,c)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#x = [int(x) for x in input().split()]
x = int(input())
y = int(input())
z = [1,2,3]
del(z[z.index(x)])
del(z[z.index(y)])
print(z[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(*ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 149a

from sys import stdin

A = int(stdin.readline().strip())
B = int(stdin.readline().strip())

print(6-A-B)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

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

    print(6-a-b)


if __name__ == '__main__':
    main()