<filename>gcj/y2019/qual/B.py
#!/usr/bin/python3

def solve():
	input()
	return input().translate({ord('S'): 'E', ord('E'): 'S'})

tests = int(input())
for t in range(tests):
	print('Case #{}: {}'.format(t + 1, solve()))

<filename>gcj/y2019/qual/B.py
#!/usr/bin/python3

def solve():
	input()
	return input().translate({ord('S'): 'E', ord('E'): 'S'})

tests = int(input())
for t in range(tests):
	print('Case #{}: {}'.format(t + 1, solve()))

#!/usr/bin/python3 #{}: {}'.format(t + 1, solve()))