Codeforces #573 (Div. 1) C. Tokitsukaze and Duel

https://codeforces.com/contest/1190/problem/C

We can return the same state by doing the same action. If we will be defeated, we should give them the same state. Therefore, this game will not end.

However, we cannot imitate the first action. If the first player can immediately defeat the other, the first player will win. If the second player can win after for any action, the second player will win. Otherwise, this game will end draw.