scientific_comp_projects/CODE/[python]kattis/trivial/trik.py
2021-10-29 15:16:40 +02:00

21 lines
418 B
Python

moves = input()
moves = list(moves)
place = 1
for move in list(moves):
if place == 1 and move == 'A':
place = 2
elif place == 2 and move == 'A':
place = 1
elif place == 1 and move == 'C':
place = 3
elif place == 3 and move == 'C':
place = 1
elif place == 2 and move == 'B':
place = 3
elif place == 3 and move == 'B':
place = 2
print(place)