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

plus = A + B

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

Submission status: Accepted

Solution code:
# A - Round One
A = int(input())
B = int(input())
print(6 - A - B)

Submission status: Accepted

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

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

Answer.remove(A)
Answer.remove(B)

print(Answer[0])

Submission status: Accepted

Solution code:
print(min(3, 7-(1<<(int(input())-1))-(1<<(int(input())-1))))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
lis=list(range(1,4))
lis.remove(a)
lis.remove(b)
print(*lis)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():

    # sys.stdin=open('input148a.txt')

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

    r = [1, 2, 3]

    r.remove(a)
    r.remove(b)

    print(r[0])
    

if __name__ == '__main__':
    main()

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())
print(int(6/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)
        break

Submission status: Accepted

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

Submission status: Accepted

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


class AtCoder:
    def main(self):
        A,B = [int(input()) for _ in range(2)]

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


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

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

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

print(select.pop())

Submission status: Accepted

Solution code:
ans = [3,1,2]
for i in range(2):
	ans.remove(int(input()))
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:
# cook your dish here
n=int(input())
m=int(input())
if (n==1 and m==2) or (n==2 and m==1):
  print('3')
elif (n==1 and m==3) or (n==3 and m==1):
  print('2')
elif (n==3 and m==2) or (n==2 and m==3):
  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:
li = [1,2,3]
for i in range(2):
  a = int(input())
  li.remove(a)
print(li[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

if a + b == 3:
    ans = 3
elif a + b == 4:
    ans = 2
elif a + b == 5:
    ans = 1

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(string):
    return str(6 - sum(map(int, string.split())))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

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

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

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

print(l[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num1 = int(input())
num2 = int(input())
print(6-num1-num2)

Submission status: Accepted

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

MON = 6
ANS = 6-A-B
print(ANS)

Submission status: Accepted

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

C = 6-A-B
print(C)

Submission status: Accepted

Solution code:
l = []

l.append(int(input()))
l.append(int(input()))

ans = set(l) ^ set([1,2,3])

for i in ans:
  print(i)

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!=3 and b!=3:
    print("3")
elif a!=2 and b!=2:
    print("2")
elif a!=1 and b!=1:
    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:
#input
A = int(input())
B = int(input())

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

Submission status: Accepted

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

add = A + B

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def wczytaj_liste(): 
    wczytana_lista = input()
    lista_znakow = wczytana_lista.split()
    ostateczna_lista = []
    for element in lista_znakow:
        ostateczna_lista.append(int(element))
    return ostateczna_lista

def A_Round_One():
    A = wczytaj_liste()[0]
    B = wczytaj_liste()[0]
    lista_odpowiedzi = [1,2,3]
    for n in lista_odpowiedzi:
        if A != n and B != n: 
            print(n)
            break
            
A_Round_One()

Submission status: Accepted

Solution code:
def solve(a, b):
    return (set([1,2,3]) - set([a,b])).pop()

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

Submission status: Accepted

Solution code:
print(1+2+3-sum(map(int, [input(),input()] )))

Submission status: Accepted

Solution code:
dic = {1:0,2:0,3:0}
a = int(input())
b = int(input())
dic[a] = 1
dic[b] = 1

for i in range(1,4):
    if dic[i] == 0:
        print(i)

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 == 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 != a and i != b:
        print(i)

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
result=[1,2,3]
for x in [A,B]:
    if x in result:
        result.remove(x)

print(*result)

Submission status: Accepted

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

Submission status: Accepted

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

a = input()
b = input()

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

ss.remove(a)
ss.remove(b)

print(str(ss[0]))

Submission status: Accepted

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

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


if int(A)+int(B)==3:
  print(3)
if int(A)+int(B)==4:
  print(2)
if int(A)+int(B)==5:
  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())
d=[1,2,3]
d.remove(a)
d.remove(b)
print(d[0])

Submission status: Accepted

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

AB = A + B

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

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in open(0).read().split()]
print(6 - A - B)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = [A, B]

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

Submission status: Accepted

Solution code:
a = input()
b = input()
 
answer_list = ["1","2","3"]
answer_list.remove(a)
answer_list.remove(b)
 
print(answer_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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import exit, stdin
A = int(stdin.readline().rstrip())
B = int(stdin.readline().rstrip())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)
print(*ans)

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

print(c[0])

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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


print(list(set(range(1, 4)).difference(set([a, b])))[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
aa = [a,b]
l = [1,2,3]
for i in l:
	if i not in aa:
		print (i)

Submission status: Accepted

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

for i in range(3):
  if A[i] == n[1] or A[i] == n[0]:
    continue
  else:
    print(A[i])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Z = S+N

A = 1

if Z == 3 :
  A = 3

if Z == 4 :
  A = 2

print(A)

Submission status: Accepted

Solution code:
answer = [True, True, True]
answer[int(input()) - 1] = False
answer[int(input()) - 1] = False
print(answer.index(True) + 1)

Submission status: Accepted

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

print (6-a-b)

Submission status: Accepted

Solution code:
s = int(input())
t = int(input())
k = 0
#print(s,t)
if s == 1: 
  if t == 2:
    k = 3
  else:
    k = 2
elif s == 2:
  if t == 1:
    k = 3
  else:
    k = 1
else:
  if t == 2:
    k = 1
  else: 
    k = 2

print(k)

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:
#!/usr/bin/env python3
a = int(input())
b = int(input())
print(a ^ b)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
l = list(range(4))
del l[0]
l.remove(a)
l.remove(b)
print(l[0])

Submission status: Accepted

Solution code:
import numpy as np
import scipy as sp

a = int(input())
b = int(input())
print(6-a-b)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
total = sum(range(1,4))
print(total - (a + b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    A = I()
    B = I()
    for i in range(1, 4):
        if i == A or i == B:
            continue
        print(i)

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

Submission status: Accepted

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

if A == 1 and B == 2:
  print(3)
elif A == 2 and B == 1:
  print(3)
elif A == 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:
s={1,2,3}
a,b=int(input()),int(input())

s.remove(a)
s.remove(b)
y=list(s)
print(y[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = input()
choices = '123'
for c in choices:
  if((c != a) and (c != b)):
    print(c)

Submission status: Accepted

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

Submission status: Accepted

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

ans.remove(input())
ans.remove(input())

print(ans[0])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


mod = 1000000007
inf = float('INF')

# solve


def solve():
    a = II()
    b = II()
    l = [3, 1, 2]
    l.remove(a)
    l.remove(b)
    print(l[0])
    return


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

Submission status: Accepted

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

choise = [1, 2, 3]

choise.remove(A)
choise.remove(B)

print(choise[0])

Submission status: Accepted

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

ans = [1,2,3]

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

print(ans[0])

Submission status: Accepted

Solution code:
A = input()
B = input()
if A == "1"or B=="1":
	if A == "2"or B=="2":
		print("3")
	elif A == "3"or B=="3":
		print("2")
elif A == "2"or B=="2":
	if A == "3"or B=="3":
		print("1")

Submission status: Accepted

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

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

Submission status: Accepted

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

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:


from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    a = ii()
    b = ii()
    for i in range(1,4):
        if a == i:
            continue
        elif b == i:
            continue
        print(i)
        exit()


    
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())
print(a ^ b)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

result = 6 - A - B

print(result)

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 i not in [A, B]: print(i)

Submission status: Accepted

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


List = [1,2,3]

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

Submission status: Accepted

Solution code:
#abc148a

a=int(raw_input())
b=int(raw_input())
l=[1,2,3]
l.remove(a)
l.remove(b)
print l[0]

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    answer=list(range(1,4))
    a=input()
    b=input()
    answer.remove(int(a))
    answer.remove(int(b))
    print(answer[0])

Submission status: Accepted

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

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

q.remove(A)
q.remove(B)

print(q[0])

Submission status: Accepted

Solution code:
def ans(n,m):
  if n+m==3:
    print("3")
  if n+m==4:
    print("2")
  if n+m==5:
    print("1")
a=int(input())
b=int(input())

ans(a,b)

Submission status: Accepted

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

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

Submission status: Accepted

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

Choice_list = [1,2,3]

if A in Choice_list:
    del Choice_list[Choice_list.index(A)]

if B in Choice_list:
    del Choice_list[Choice_list.index(B)]

print(Choice_list[0])

Submission status: Accepted

Solution code:
# まじで問題文の意味がわからん
A = int(input())
B = int(input())

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    A=list(range(1,4))
    a=int(input())
    b=int(input())
    A.remove(a)
    A.remove(b)
    print(*A)
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(raw_input())
B = int(raw_input())
ans = []
ans.append(A)
ans.append(B)

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

Submission status: Accepted

Solution code:
s = set(('1', '2', '3'))
for _ in range(2):
    s.remove(input())
print(s.pop())

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(*ans)

Submission status: Accepted

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

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

n.remove(a)
n.remove(b)

print(n[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ans=6
for i in [0]*2:
  ans-=int(input())
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意


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

if a > b: a,b = b,a

ans = 1
if ans == a: ans = 2
if ans == b: ans = 3

print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
st = set()
st.add(a)
st.add(b)
print(list(set([1,2,3]) - st)[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==3:
  print("1")
if A==1 and B==3:
  print("2")
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:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

a = INT()
b = INT()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

# code here
a = int(input().strip())
b = int(input().strip())

print(6 - a - b)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))
ni = lambda: int(ns())

a = ni()
b = ni()

x = min(a, b)
y = max(a, b)

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

Submission status: Accepted

Solution code:
s =[1,2,3]
del s[s.index(int(input()))]
del s[s.index(int(input()))]
print(*s)

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


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


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


def main():
    A, B = int(input()), int(input())
    print(6 - A - B)


main()

Submission status: Accepted

Solution code:
s = "123"
a = input()
b = input()
s=s.replace(a,"")
s=s.replace(b,"")
print(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:
# -*- coding: utf-8 -*-
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)
"""

"""
if A > B:
    A, B = B, A

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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)
"""
"""
if A > B:
    A, B = B, A

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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)
"""

if A > B:
    A, B = B, A

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A = int(input())
B = int(input())

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

Submission status: Accepted

Solution code:
a,b=map(int,open(0));print(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:
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:

def solve():
    a = input()
    b = input()

    if(a != '1' and b != '1'):
        print(1)
    elif(a != '2' and b != '2' ):
        print(2)
    else:
        print(3)
    
    return

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


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


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

Submission status: Accepted

Solution code:
a = int(input())
b = int(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())
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")
    elif B==2:
        print("1")

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())
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:
import math as m
from array import *
import sys
import datetime
import calendar


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(raw_input())
b = int(raw_input())
ans = set([1,2,3])
ip = set([a,b])
print (ans-ip).pop()