#Read input
t = int(input()) # read a line with a single integer
for i in range(1, t + 1):
    grid_size = int(input())
    path = list(input())
    for letter in range(len(path)):
        if path[letter] == 'E':
            path[letter] = 'S'
        else:
            path[letter] = 'E'
    path = ''.join(path)
    #Print Solution
    print("Case #{}: {}".format(i,path))

bc72970b66c298deef2e7275eb05b50bc39963a5
<mask token>

<mask token>
for i in range(1, t + 1):
    grid_size = int(input())
    path = list(input())
    for letter in range(len(path)):
        if path[letter] == 'E':
            path[letter] = 'S'
        else:
            path[letter] = 'E'
    path = ''.join(path)
    print('Case #{}: {}'.format(i, path))

t = int(input())
for i in range(1, t + 1):
    grid_size = int(input())
    path = list(input())
    for letter in range(len(path)):
        if path[letter] == 'E':
            path[letter] = 'S'
        else:
            path[letter] = 'E'
    path = ''.join(path)
    print('Case #{}: {}'.format(i, path))

#Read input
t = int(input()) # read a line with a single integer
for i in range(1, t + 1):
    grid_size = int(input())
    path = list(input())
    for letter in range(len(path)):
        if path[letter] == 'E':
            path[letter] = 'S'
        else:
            path[letter] = 'E'
    path = ''.join(path)
    #Print Solution
    print("Case #{}: {}".format(i,path))
