Created
February 12, 2018 16:23
-
-
Save abidkhan484/57ab533af8844557e9b04fe65adae851 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for nothing in range(int(input().strip())): | |
| n, first = map(int, input().split()) | |
| sec = first | |
| for _ in range(n): | |
| d = input().split() | |
| if d[0]=='P': | |
| first = sec | |
| sec = d[1] | |
| elif d[0]=='B': | |
| sec, first = first, sec | |
| print('Player', sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment