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

Q = [1,2,3]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

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

	lst = [1,2,3]

	lst.remove(A)
	lst.remove(B)

	print(lst[0])


if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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

results = [1, 2, 3]

results.remove(A)
results.remove(B)

print(results[0])

Submission status: Accepted

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

sum = a + b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin
f_i = stdin
#f_i = open('ABC_147_C_in_s2')#

answers = [1, 2, 3]
A = int(f_i.readline())
B = int(f_i.readline())

answers.remove(A)
answers.remove(B)

print(answers[0])

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

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())
candidates = [False for _ in range(3)]
candidates[a - 1] = True
candidates[b - 1] = True
for i, candidate in enumerate(candidates):
    if not candidate:
        print(i + 1)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=int(input())
B=int(input())
ans=[1,2,3]
if A>B:
    ans.pop(A-1)
    ans.pop(B-1)
else:
    ans.pop(B-1)
    ans.pop(A-1)

print(ans[0])

Submission status: Accepted

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

answer = [1, 2, 3]

answer.pop(answer.index(a))
answer.pop(answer.index(b))

print(answer[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = [1, 2, 3]

if a in ans:
  ans.remove(a)
  if b in ans:
    ans.remove(b)
    
print(ans[0])

Submission status: Accepted

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


def main():
    ans = [1,2,3]
    a = int(input())
    b = int(input())
    ans.remove(a)
    ans.remove(b)
    print(ans[0])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

s = a+b

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

ans = set([1,2,3])
ans.remove(a)
ans.remove(b)
for i in ans:
    print(i)

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

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

print(Ans.pop())

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a = inn()
b = inn()
if a in [1,2] and b in [1,2]:
    print(3)
    exit()
if a in [1,3] and b in [1,3]:
    print(2)
    exit()
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:
from sys import stdin 
a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

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

Submission status: Accepted

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


def solve(A: int, B: int):
    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)


    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


def solve():
    A = int(input())
    B = int(input())
    ans = [1,2,3]
    ans[A-1]=0
    ans[B-1]=0
    print(max(ans))


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=[a,b]
for i in range(1,4):
  if i not in ans:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 6 - A - B

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

number.remove(int(input()))
number.remove(int(input()))
print(number[0])

Submission status: Accepted

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

nums = [1,2,3]

del nums[nums.index(a)]
del nums[nums.index(b)]

print(nums[0])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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=[]
a.append(int(input()))
a.append(int(input()))
if not 1 in a:
    print(1)
if not 2 in a:
    print(2)
if not 3 in a:
    print(3)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

mylist = [1,2,3]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Num1 = int(input())
Num2 = int(input())

NumSt = [0,0,0]

NumSt[Num1-1] = 1
NumSt[Num2-1] = 1

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

Submission status: Accepted

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

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

print(ans[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

num.remove(int(input()))
num.remove(int(input()))

print(num[0])

Submission status: Accepted

Solution code:
import sys; readline = sys.stdin.readline
from collections import deque

A = int(readline())
B = int(readline())

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

Submission status: Accepted

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

print("{}".format(6-a-b))

Submission status: Accepted

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

print(*({1, 2, 3} - {a, b}))

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:
# 2019/12/22

a=int(input())
b=int(input())
ans=[1,2,3]
ans.remove(a)
ans.remove(b)
print(*ans)

Submission status: Accepted

Solution code:
a, b = input(), input()
s = list("123")
s.pop(s.index(a))
s.pop(s.index(b))
print(s[0])

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	A = int(input())
	B = int(input())
	l = []
	l.append(A)
	l.append(B)
	if 1 in l:
		if 2 in l:
			print("3")
		elif 3 in l:
			print("2")
	else:
		print("1")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
st = {1, 2, 3}
st.remove(int(input()))
st.remove(int(input()))
print(list(st)[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())

ab = [a, b]

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

Submission status: Accepted

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

ans = int('123'.replace(a, '').replace(b, ''))

print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# @Author: Amit Dwivedi
# @Date:   2019-12-22 11:55:43
# @Last Modified by:   Amit Dwivedi
# @Last Modified time: 2019-12-22 12:02:10
ll= lambda : list(map(int,input().split()))
testcases=1
# testcases=int(input())
for testcase in range(testcases):
	[a]=ll()
	[b] = ll()
	x =[1,2,3]
	for i in x:
		if(i!=a and i!=b):
			print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	a = int(input())
	b = int(input())
	if(set([a,b])==set([1,2])):
		print(3)
	elif(set([a,b])==set([1,3])):
		print(2)
	else:
		print(1)

def factorization(n):
	if n<2:
		return []
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

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

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Submission status: Accepted

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

Submission status: Accepted

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

answer = {1,2,3} - {a, b}

print(list(answer)[0])

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:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

# a, b = MAP()
a = INT()
b = INT()
l = [1, 2, 3]

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

print(l[0])

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

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:
# -*- coding: utf-8 -*-
import math
import datetime
import itertools
import sys
import copy

# 入力
#N = int(input())
#S = str(input())
#N, A, B = map(int, input().split())
A = int(input())
B = int(input())

print (6-A-B)

Submission status: Accepted

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

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, b = int(input()), int(input())
ans = [1,2,3]

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

print(ans[0])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a=int(input())
b=int(input())
print(6-a-b)

Submission status: Accepted

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

n = [1,2,3]

n.remove(A)
n.remove(B)

print(n[0])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

c = []
a = I()
b = I()
c.append(a)
c.append(b)
if 1 in c and 2 in c:
    print(3)
    exit()
if 1 in c and 3 in c:
    print(2)
else:
    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)
        break

Submission status: Accepted

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

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

Submission status: Accepted

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

output = 6 - A - B

print(output)

Submission status: Accepted

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

s = set()
s.add(a)
s.add(b)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if a==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())

ans = [1,2,3]

for i in ans:
        if i == A:
                continue
        elif i == B:
                continue
        else:
                print(i)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

all_set = {"1", "2", "3"}

all_set.remove(a)
all_set.remove(b)

for i in all_set:
    print(i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    A = int(input())
    B = int(input())
    for x in [1, 2, 3]:
        if x != A and x != B:
            print(x)
            break


if __name__ == "__main__":
    main()

Submission status: Accepted

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

tmp = [1,2,3]

for t in tmp:
  if t != a and t!=b:
    print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = [int(input()) for _ in range(2)]
if 1 not in x:
    ans = 1
elif 2 not in x:
    ans = 2
else:
    ans = 3
print(ans)

Submission status: Accepted

Solution code:
def main():
	a = int(input())
	b = int(input())
	#n,m = map(int,input().split())
	# A = [list(map(int, input().split())) for _ in range(H)]

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

	print(int(l[0]))

	




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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

ab = int(input()) + int(input())

print(6-ab)

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

ans = [False] * 3

ans[a-1] = True
ans[b-1] = True

for i in range(3):
  if not ans[i]:
    print(i+1)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
if a + b == 4:
    print(2)
elif a+b == 5:
    print(1)
elif a+b == 3:
    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:
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())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)
print(*ans)

Submission status: Accepted

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

C = "123"

C = C.replace(A, "")
C = C.replace(B, "")

print(C)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
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:
x1 = [int(input()) for i in range(2)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

lst = [1, 2, 3]

for _ in lst:
    if _ == a or _ == b:
        pass
    else:
        print(_)

Submission status: Accepted

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

Submission status: Accepted

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

ab  = [A, B]
all = [1,2,3]

for i in all:
  if i in ab:
    continue
  else:
    print(i)
    break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
X = [0] * 4
X[A] = 1
X[B] = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if 1 not in (x):
    print("1")
if 2 not in (x):
    print("2")
if 3 not in (x):
    print("3")

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:

def main():
    A = int(input())
    B = int(input())
    now = set([1,2,3])
    now.discard(A)
    now.discard(B)
    print(now.pop())

if __name__ == "__main__":
    main()