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

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())
list_AB = [A, B]

C = sum(list_AB)

if C == 3:
    print(3)
    
elif C == 4:
    print(2)

else:
    print(1)

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

Submission status: Accepted

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

for i in range(1,4):
  if nList.count(i) == 0:
    print(i)
    exit(0)

Submission status: Accepted

Solution code:
a,b=[int(input()) for _ in range(2)]
print(list(set([1,2,3])-set([a,b]))[0])

Submission status: Accepted

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

ans = {1, 2, 3}

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

a = ans.pop()
print(a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
problem : ABC149
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

A, B = map(int,read().split())
print(6 - A - B)

Submission status: Accepted

Solution code:
def Calc(n1,n2) :
    a = 6 - (n1+n2)
    return a

if __name__ == "__main__":
    a = int(input())
    b = int(input())
    print (Calc(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=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 = 6-A-B

print(ans)

Submission status: Accepted

Solution code:
arr=[]
arr.append(int(input()))
arr.append(int(input()))
print(list(set([1,2,3])-set(arr))[0])

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = 0
    if 1 in [A, B] and 2 in [A, B]:
        ret = 3
    if 1 in [A, B] and 3 in [A, B]:
        ret = 2
    if 2 in [A, B] and 3 in [A, B]:
        ret = 1
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

x = [1, 2, 3]

x.remove(A)
x.remove(B)

for i in x:
    print(i)

Submission status: Accepted

Solution code:
def resolve():
    input_list = [int(input()) for i in range(2)]
    num_list = [1, 2, 3]
    for i in input_list:
        num_list.remove(i)
    print(num_list[0])
    
 
if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
 
print(6-A-B)	#和から誤答を引けば正答

Submission status: Accepted

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

Submission status: Accepted

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

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

print(6-a-b)

Submission status: Accepted

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

def solve():
    A = int(input())
    B = int(input())
    cands = [1,2,3]
    cands.remove(A)
    cands.remove(B)
    print(cands[0])

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
# AtCoder Beginner Contest 148 - A
# -*- encoding: UTF-8 -*-

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

q = {1, 2, 3}

q.remove(a)
q.remove(b)

a = q.pop()

print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

nums = {1,2,3}

print((nums-{a}-{b}).pop())

Submission status: Accepted

Solution code:
A,B=int(input()),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,b=[int(input()) for i in range(2)]
print(6//(a*b))

Submission status: Accepted

Solution code:
# ABC148A - Round One
def main():
    AB = map(int, open(0).read().split())
    print(6 - sum(AB))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x1 = int(input())
x2 = int(input())

a = 6 - x1 - x2
print(a)

Submission status: Accepted

Solution code:
n1 = int(input())
n2 = int(input())

if n1 + n2 == 3:
    print(3)
elif n1 + n2 == 4:
    print(2)
elif n1 + n2 == 5:
    print(1)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a = I()
    b = I()

    return 6 - a - b


print(main())

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jan  5 09:57:37 2020

@author: masat
"""

A = input()
B = input()

false_list = [A, B]
answer_list = ["1", "2", "3"]

answer = None
for i in answer_list:
    if i  not in false_list:
        answer = i
    else:
        pass

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import numpy as np

a = list(map(int, input().split()))
b = list(map(int, input().split()))

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

print(ans[0])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
error_list = [A, B] 
ans_list = [1,2,3]
ans = list(set(error_list)^set(ans_list))
print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""
a = int(input())
b, c = map(int, input().split())
s = input()
print(a + b + c, s)
"""
A = int(input())
B = int(input())

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

Submission status: Accepted

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

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

answer = list(pos - {A, B})[0]
print(answer)

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

Submission status: Accepted

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


# A = 3
# B = 1
print(6 - A- B)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
##  input functions for me
def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
def main():
    A = ri()
    B = ri()
    for i in range(1,4):
        if i != A and i != B: print(i)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(str(6-A-B))

Submission status: Accepted

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


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

Submission status: Accepted

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

if abs(A - B) == 2:
    print('2')

elif A + B == 3:
    print('3')

else:
    print('1')

Submission status: Accepted

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


listt = []
listt.append(a)
listt.append(b)
if 1 in listt and 2 in listt:
    print(3)

if 2 in listt and 3 in listt:
    print(1)

if 1 in listt and 3 in listt:
    print(2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(res[0])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
print(6 - sum(int(input()) for _ in range(2)))

Submission status: Accepted

Solution code:
A,B=open(0);print(int(A)^int(B))

Submission status: Accepted

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

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

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

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:
'''input
3
4
1 2 3 6
1
8
2
1 1
'''
# A coding delight
from sys import stdin
from collections import defaultdict


# main starts
a = int(stdin.readline().strip())
b = int(stdin.readline().strip())
arr = [1, 2, 3]
for i in arr:
	if i != a and i != b:
		print(i)
		exit()

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

Submission status: Accepted

Solution code:
numA = int(input())
numB = int(input())

result = 0

for i in range(1, 4):
  if i != numA and i != numB:
    result = i
print(result)

Submission status: Accepted

Solution code:
a = []
a.append(int(input()))
a.append(int(input()))
a.sort()
ans = True
for i in range(len(a)):
  if a[i] != i+1:
    print(i+1)
    ans = False
    break
if ans:
  print(3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = ({1,2,3} - {a,b}).pop()
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# ↑シェバン、SHEBANG

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

print((1+2+3)-(A+B))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial
sys.setrecursionlimit(200000)
input = sys.stdin.readline

X, = map(int, input().split())
N, = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

print(({1, 2, 3} - {X} - {N}).pop())

Submission status: Accepted

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

Submission status: Accepted

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

print(*(set([1, 2, 3]) - set([A, B])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

A=II()
B=II()
print(6-A-B)

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
num = [1,2,3]
for n in num:
    if not n == A and not n == B:
        C = n
        break
print(C)

Submission status: Accepted

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

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

c = a * b

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

Submission status: Accepted

Solution code:
n = {int(input()) for i in range(2)}
q = {1,2,3}
ans = q.difference(n)
for i in ans:
    print(i)

Submission status: Accepted

Solution code:
class Solution:
    def solve(self, a: int, b: int) -> int:
        return 6 // a // b


if __name__ == '__main__':

    # standard input
    a = int(input())
    b = int(input())

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Accepted

Solution code:
def f(a,b):
    if a!=3 and b!=3:
        return 3
    if a!=2 and b!=2:
        return 2
    if a!=1 and b!=1:
        return 1
a=int(input())
b=int(input())
print(f(a,b))

Submission status: Accepted

Solution code:
answerA = int(input())
answerB = int(input())
print(6 - answerA - answerB)

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

Submission status: Accepted

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

if "1" not in wrong:
  print("1")
elif "2" not in wrong:
  print("2")
elif "3" not in wrong:
  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:
array = [1, 2, 3]
 
for _ in range(2):
  num = int(input())
  array.pop(array.index(num))
 
print(array[0])

Submission status: Accepted

Solution code:
#a,b,x=map(int,input().split())
a=int(input())
b=int(input())
print(6-a-b)

Submission status: Accepted

Solution code:
import sys

A = input()
B = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
# A.py : A - Round One

def main():
    _a = int(input())
    _b = int(input())

    answers = [1,2,3]

    _a_index = answers.index(_a)
    answers.pop(_a_index)

    _b_index = answers.index(_b)
    answers.pop(_b_index)

    print(answers[0])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

opt.remove(a)
opt.remove(b)

print(opt[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:
from sys import stdin

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print list({1, 2, 3} - {a, b})[0]

Submission status: Accepted

Solution code:
a, b = [int(input()) for _ in range(2)]
set_ = {1,2,3}
set_.discard(a)
set_.discard(b)
print(set_.pop())

Submission status: Accepted

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

Submission status: Accepted

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

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:
x = []
x.append(int(input()))
x.append(int(input()))

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

Submission status: Accepted

Solution code:
*AB, = open(0).read().split()
print("".join(set(["1", "2", "3"]) ^ set(AB)))

Submission status: Accepted

Solution code:
# 値の入力
A=int(input())
B=int(input())

result=0    # 結果

Ans=[1,0,0,0]

# 値の判定
Ans[A]=1
Ans[B]=1

print(Ans.index(0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = set(('1','2','3'))
A = input()
s.remove(A)
B = input()
s.remove(B)
print(s.pop())

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

a = internal[0] + internal[1]
b = 6
c = b - a
print(c)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N1 = int(input())
N2 = int(input())
result = filter(lambda x: x not in [N1, N2], [1,2,3])
print(list(result)[0])

Submission status: Accepted

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

myset = ([1,2,3]) 

myset.remove(a)
myset.remove(b)

l = list(myset)
print(l[0])

Submission status: Accepted

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

Takahashi = set([A, B])

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

anser = number - Takahashi

anser = list(anser)

print(anser[0])

Submission status: Accepted

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

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

print(l[0])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = set((1,2,3))
b = int(input())
c = int(input())
a.remove(b)
a.remove(c)
for x in a:
  print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(a[0])

Submission status: Accepted

Solution code:
from sys import stdin
INF = float("inf")#無限大の設定1
IINF = 10 ** 18#無限大の設定2
MOD = 10 ** 9 + 7#まれに用いるmodを予め設定しておく
a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
#A, B, C = map(int, stdin.readline().rstrip().split())
#S = [list(stdin.buffer.readline().decode().rstrip()) for _ in range(h)]
if a!=1 and b!=1:
    print(1)
if a!=2 and b!=2:
    print(2)
if a!=3 and b!=3:
    print(3)

Submission status: Accepted

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

Submission status: Accepted

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

Answer = [1,2,3]

if A in Answer:
  Answer.remove(A)
if B in Answer:
  Answer.remove(B)
print(*Answer)

Submission status: Accepted

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

Submission status: Accepted

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

if __name__=='__main__':
  a = int(input())
  b = int(input())
  if a > b:
    a, b = b, a
  di = {(1, 2):3, (2, 3):1, (1, 3): 2}
  print(di[(a, b)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
#A,B= map(int,input().split())
#v =list(map(int,input().split()))
# [list(map(int,input().split())) for i in range(N)]

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

Submission status: Accepted

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

list = [1, 2, 3]

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

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

Submission status: Accepted

Solution code:
# Round One

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

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

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


print(l[0])

Submission status: Accepted

Solution code:
def round_one(arr):
    ans_candidates = [1,2,3]
    for c in ans_candidates:
        if c in arr:
            pass
        else:
            print(c)


if __name__ == "__main__":
    a = [int(input()) for i in range(2)]
    round_one(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(Z[0])

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
x = set([1,2,3])
x.remove(a)
x.remove(b)
print(x.pop())

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def run(A, B):
    ans = None
    if 1 not in [A, B]:
        ans = 1
    if 2 not in [A, B]:
        ans = 2
    if 3 not in [A, B]:
        ans = 3
    return ans


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
b = [int(input()) for i in range(2)]
for i in range(1,4):
    if i not in b:
        print(i)

Submission status: Accepted

Solution code:
x=int(input())
y=int(input())
while x != y:
    if (x == 1 and y == 2) or (y==1 and x==2):
        print(3)
        break
    elif (x == 1 and y == 3) or (y==1 and x==3):
        print(2)
        break
    elif (x == 2 and y == 3) or (y==2 and x==3):
        print(1)
        break

Submission status: Accepted

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

Submission status: Accepted

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

if A+B == 5:
  print (1)
elif A+B==4:
  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, b = map(int, [input() for i in range(2)])
result = 6-a-b
print(result)

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

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())
ar = [0] * 4
ar[a] = 1
ar[b] = 1
for i in range(1, 4):
    if ar[i] == 0:
        print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input(), input()
#a,b=2,3
a,b= [int(i) for i in [a,b]]
all = [1,2,3]
result = list(filter(lambda x: not x in [a,b], all))
print(result[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:
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:
wrong = [int(input()) for _ in range(2)]
for x in range(1, 4):
    if x not in wrong:
        print(x)

Submission status: Accepted

Solution code:
in1 = int(input())
in1 += int(input())

print(6 - in1)

Submission status: Accepted

Solution code:
input1 = int(input())
input2 = int(input())
 
if input1 == 1:
  print(3) if input2 == 2 else print(2)
elif input1 == 2:
  print(3) if input2 == 1 else print(1)
else:
  print(1) if input2 == 2 else print(2)