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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

li = LIST(2)
if 1 not in li:
    print(1)
elif 2 not in li:
    print(2)
else:
    print(3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a = int(sys.stdin.readline())
b = int(sys.stdin.readline())

L = [1,2,3]

for i in range(3):
    if L[i] != a and L[i] !=b:
        print(L[i])

Submission status: Accepted

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

anss = [1,2,3]

anss.remove(int(A))
anss.remove(int(B))
print(anss[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

L = 6

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    return ({'1', '2', '3'}-{input(),input()}).pop()

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

anss = [1, 2, 3]
dans = [a, b]
ans = 0
for i in anss:
  if i in dans:
    continue
  ans = i
print(ans)

Submission status: Accepted

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

ans = "123"
ans = ans.replace(A, "").replace(B, "")

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
f = int(input())
s = int(input())

print(6 - f - s)

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


def solve(*args: str) -> str:
    ans = set(['1', '2', '3'])
    return (ans - set(args)).pop()


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

Submission status: Accepted

Solution code:
def run():
  A = int(input())
  B = int(input())
  for C in range(1, 4):
    if C == A: continue
    elif C == B: continue
    else:
      print(C)
  
if __name__ == '__main__':
  run()

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a = I()
b = I()

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

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

l = {1, 2, 3}
l -= {A}
l -= {B}

print(*l)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a, b = int(input()), int(input())
print((set([1,2,3]) - set([a,b])).pop())

Submission status: Accepted

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

s = set([1,2,3])
s.remove(A)
s.remove(B)
print(s.pop())

Submission status: Accepted

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

for i in ans:
    if i != A and i != B:
        print(i)

Submission status: Accepted

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

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:
s = [input() for _ in range(2)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = set()
s.add(A)
s.add(B)

sa = {1, 2, 3}

print(*(sa - s))

Submission status: Accepted

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

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

print(6-a-b)

Submission status: Accepted

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

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

Submission status: Accepted

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

s = 6 - a - b
print(s)

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

for i in l:
    print(i)

Submission status: Accepted

Solution code:
INF = float("inf") #const
MOD = 10**9+7 #const
MAX = 510000 #const

def main():
    a = [int(input()) for i in range(2)]
    if 1 not in a:
        print(1)
    elif 2 not in a:
        print(2)
    elif 3 not in a:
        print(3)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

ls = [1,2,3]

ls.remove(a)
ls.remove(b)

c = ls[0]

print(c)

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

Submission status: Accepted

Solution code:
import math


def inputIntList():
    return [int(s) for s in input().split()]


def inputInt():
    return int(input())


def main():
    ans = [1, 2, 3]
    ans.remove(inputInt())
    ans.remove(inputInt())

    return ans[0]


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def read():
    A = int(input().strip())
    B = int(input().strip())
    return A, B

def solve(A, B):
    answers = set([1, 2, 3])
    answers.remove(A)
    answers.remove(B)
    return answers.pop()


if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

Submission status: Accepted

Solution code:

l = "123"
for i in range(2):
    l = l.replace(input(),"")
print(l)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
"""
Atcoder_Beginner_Contest_148
A
"""
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000)

ans = [1,2,3]
A = int(input())
B = int(input())
result = set(ans) - set([A,B])

print(result.pop())

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 sys

A = int(input())
B = int(input())
List = [1, 2, 3]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans = [True] * 3
ans[int(input()) - 1] = False
ans[int(input()) - 1] = False
print(ans.index(True) + 1)

Submission status: Accepted

Solution code:
def examA():
    AB = [I() for _ in range(2)]
    for i in range(1,4):
        if not i in AB:
            ans = i
            break
    print(ans)
    return

def examB():
    return

def examC():
    return

def examD():
    return

def examE():
    return

def examF():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Submission status: Accepted

Solution code:
N=int(input())
S=int(input())

list=[1,2,3]

list.remove(N)
list.remove(S)

print(list[0])

Submission status: Accepted

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

li = [0,1,2,3]
li[a] = 0
li[b] = 0

ans = max(li)
print(ans)

Submission status: Accepted

Solution code:
a = str(input())
b = str(input())
k = ["1","2","3"]
k.remove(a)
k.remove(b)
print(k[0])

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 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:
n1 = int(input())
n2 = int(input())
#a,b = map(int,input())
#L = list(map(int,input().split()))
print(6-n1-n2)

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

Submission status: Accepted

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

print(*(set([1, 2, 3])  -set([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:
a = int(input())
b = int(input())
x = min(a, b)
y = max(a, b)
if x == 1:
    if y == 2:
        print(3)
    else:
        print(2)
else:
    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==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:
from sys import stdin

n = int(stdin.readline().rstrip())
m = int(stdin.readline().rstrip())
li = [1,2,3]

li.remove(n)
li.remove(m)
print(li[0])

Submission status: Accepted

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

C = [1,2,3]

C.remove(A)
C.remove(B)

print(int(C[0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = int(input())

if a in (1, 2) and b in (1, 2):
    print(3)
elif a in (1, 3) and b in (1, 3):
    print(2)
else:
    print(1)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = set([1,2,3])
w = set([a,b])
ans = list(ans - w)
print("{}".format(ans[0]))

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline())
def LI(): return [int(x) for x in sys.stdin.readline().split()]

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

if __name__ == "__main__":
    main()

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

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:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
for tt in range(1):
    a=int(input())
    b=int(input())
    if a*b==6:
        print(1)
    elif a*b==3:
        print(2)
    else:
        print(3)
    #n= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

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

rslt = ans.pop()
print(rslt)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
candidate = set([1,2,3])

a = int(input())
b = int(input())
candidate.remove(a)
candidate.remove(b)
print(candidate.pop())

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
if min(A, B) == 1 and max(A, B) == 2:
    print(3)
elif min(A, B) == 2 and max(A, B) == 3:
    print(1)
else:
    print(2)

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    b = int(input())
    if a+b == 3:
        print(3)
    elif a+b == 4:
        print(2)
    elif a+b == 5:
        print(1)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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())
t1 = {a, b}
t = {1, 2, 3}
for i in t-t1:
    print(i)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
a=int(input())
b=int(input())
if 1!=a and 1!=b:
    print(1)
elif 2!=a and 2!=b:
    print(2)
else:
    print(3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a = ri()
    b = ri()
    num = [True for _ in range(4)]
    num[a] = False
    num[b] = False
    for i in range(1, 4):
        if num[i]:
            print(i)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

Solution code:
def main():
    A = [int(input()) for _ in range(2)]
    num = [1,2,3]
    for n in num:
        if not n in A:
            print(n)
            exit()



if __name__ == "__main__":
    main()

Submission status: Accepted

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

sol = 6 - (A+B)

print(sol)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=input()
B=input()
for x in range(1,4):
    if x==A: continue
    elif x==B: continue
    print x

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in alist:
    if A == i or B == i:
        continue
    else:
        print(i)

Submission status: Accepted

Solution code:
def main():
    A = int(input())
    B = int(input())
    for i in range(3):
        if i + 1 == A or i + 1 == B:
            continue
        else:
            print(i+1)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for e in (set([1,2,3])-T):
    print(e)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
ans = [0, 0, 0, 0]
ans[a] = 1
ans[b] = 1
if ans[1] == 0:
    print(1)
if ans[2] == 0:
    print(2)
if ans[3] == 0:
    print(3)

Submission status: Accepted

Solution code:
n = int(input())
m = int(input())
print((5 - n -m)%3 + 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())

la = [True] * 4

la[a] = False
la[b] = False

for i in range(1, 4):
    if la[i]:
        print(i)

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

Submission status: Accepted

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


def main():
    sc = Scan()
    a = sc.intarr()[0]
    b = sc.intarr()[0]

    print(6 - a - b)


class Scan():

    def intarr(self):
        line = input()
        array = line.split(' ')
        num_array = [int(n) for n in array]
        return num_array

    def intarr_ver(self, n):
        return [int(input()) for _ in range(n)]

    def strarr(self):
        line = input()
        array = line.split(' ')
        array[-1] = array[-1].strip('\n')
        return array


def display(array):
    for a in range(len(array)):
        if len(array) - a != 1:
            print(array[a], end=' ')
        else:
            print(array[a])


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def natural_num(n):
    for j in range(2, int(math.sqrt(n))+1):
        if n % j == 0:
            return 0
    return 1


main()

Submission status: Accepted

Solution code:
#coding:utf-8
a = int(input())
b = int(input())
ans = [1, 2, 3]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

A=one_int()
B=one_int()

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

print(list(temp-set([A])-set([B]))[0])

Submission status: Accepted

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

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

temp = [1, 2, 3]
if a in temp:
    temp.remove(a)
if b in temp:
    temp.remove(b)
print(temp[0])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A=int(input())
B=int(input())

l=[1,2,3]
l.pop(max(A,B)-1)
l.pop(min(A,B)-1)

print(l[0])

Submission status: Accepted

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

l = [1,2,3]

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

print(*l)

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))

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:

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']

show_flg = False
# show_flg = True


def main():
    A = I()
    B = I()
    ans = {1: True, 2:True, 3:True}
    ans[A] = False
    ans[B] = False

    for i in ans.keys():
        if ans[i] is True:
            print(i)
            return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

aaa = set([1,2,3])
aa = set()

a = onem()
aa.add(a)
b = onem()
aa.add(b)

print((aaa-aa).pop())

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict
from copy import deepcopy
import itertools
input = sys.stdin.readline
# 文字列の場合は普通のinput()を使うか下を使う
# input = sys.stdin.readline().rstrip()

A = int(input())
B = int(input())
S = set([1,2,3])
S.discard(A)
S.discard(B)
ans = S.pop()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

for i in l:
    if i != a and i != b:
        print(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)
elif A != 3 and B != 3:
	print(3)

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

Submission status: Accepted

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

print(6-(a+b))

Submission status: Accepted

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

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

ans = 6 - A - B

print(ans)

Submission status: Accepted

Solution code:
I=lambda:list(map(int,input().split()))
a=int(input())
b=int(input())
x=[1,2]
y=[1,3]
z=[2,3]
aa=[a,b]
aa.sort()
if aa==x:
    print(3)
elif aa==y:
    print(2)
elif aa==z:
    print(1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    a = I()
    b = I()
    print(6 - a - b)
    return


# B
def B():
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    A()
    return


# Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:
from sys import stdin
A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())
ans = {1,2,3} - {A} - {B}
print(list(ans)[0])

Submission status: Accepted

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

Submission status: Accepted

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