Snuke, who loves animals, built a zoo.
There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle.
The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered N is adjacent to the animals numbered N-1 and 1.
There are two kinds of animals in this zoo: honest sheep that only speak the truth, and lying wolves that only tell lies.
Snuke cannot tell the difference between these two species, and asked each animal the following question: "Are your neighbors of the same species?" The animal numbered i answered s_i. Here, if s_i is o, the animal said that the two neighboring animals are of the same species, and if s_i is x, the animal said that the two neighboring animals are of different species.
More formally, a sheep answered o if the two neighboring animals are both sheep or both wolves, and answered x otherwise.
Similarly, a wolf answered x if the two neighboring animals are both sheep or both wolves, and answered o otherwise.
Snuke is wondering whether there is a valid assignment of species to the animals that is consistent with these responses. If there is such an assignment, show one such assignment. Otherwise, print -1.

-----Constraints-----
 - 3 ≤ N ≤ 10^{5}
 - s is a string of length N consisting of o and x.

-----Input-----
The input is given from Standard Input in the following format:
N
s

-----Output-----
If there does not exist an valid assignment that is consistent with s, print -1.
Otherwise, print an string t in the following format. The output is considered correct if the assignment described by t is consistent with s.
 - t is a string of length N consisting of S and W.
 - If t_i is S, it indicates that the animal numbered i is a sheep. If t_i is W, it indicates that the animal numbered i is a wolf.

-----Sample Input-----
6
ooxoox

-----Sample Output-----
SSSWWS

For example, if the animals numbered 1, 2, 3, 4, 5 and 6 are respectively a sheep, sheep, sheep, wolf, wolf, and sheep, it is consistent with their responses. Besides, there is another valid assignment of species: a wolf, sheep, wolf, sheep, wolf and wolf.
Let us remind you: if the neiboring animals are of the same species, a sheep answers o and a wolf answers x. If the neiboring animals are of different species, a sheep answers x and a wolf answers o.

Difficulty: interview

Starter code:

Solutions:
import copy
n = int(input())
s = input()
s += s[0]+s[1]

kouho = ['SS','SW','WS','WW']

for x in kouho:
    ans = copy.deepcopy(x)
    for i in range(1,n+1):
        if (s[i]=='o' and ans[i]=='S') or (s[i]=='x' and ans[i]=='W'):
            if ans[i-1]=='S':
                ans+= 'S'
            else:
                ans+='W'
        else:
            if ans[i-1]=='S':
                ans+='W'
            else:
                ans+='S'
    #円環成してるので正しければ頭二個と後ろ2個は同じになるはず
    if ans[-2:]==x:
       print(ans[:n])
       return
print(-1)

N = int(input())
s = input()
first = [['S','S'],['S','W'],['W','S'],['W','W']]
flag = 0
mojiretu = ''

def hypothesis(N,s,ans1,ans2):
    ans = [ans1,ans2]
    for i in range(1,N-1):
        if ans[i] == 'S':
            if s[i] == 'o':
                if ans[i-1] == 'S':
                    ans.append('S')
                else:
                    ans.append('W')
            elif s[i] == 'x':
                if ans[i-1] == 'S':
                    ans.append('W')
                else:
                    ans.append('S')
        if ans[i] == 'W':
            if s[i] == 'o':
                if ans[i-1] == 'S':
                    ans.append('W')
                else:
                    ans.append('S')
            elif s[i] == 'x':
                if ans[i-1] == 'S':
                    ans.append('S')
                else:
                    ans.append('W')
    return ans

def conf(ans_sub):
    flag2 = 0
    if ans_sub[0] == 'S' and s[0] == 'o':
        if ans_sub[1] == ans_sub[N-1]:
            if ans_sub[N-1] == 'S' and s[N-1] == 'o':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'S' and s[N-1] == 'x':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'o':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'x':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1

    elif ans_sub[0] == 'S' and s[0] == 'x':
        if ans_sub[1] != ans_sub[N-1]:
            if ans_sub[N-1] == 'S' and s[N-1] == 'o':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'S' and s[N-1] == 'x':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'o':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'x':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1

    elif ans_sub[0] == 'W' and s[0] == 'o':
        if ans_sub[1] != ans_sub[N-1]:
            if ans_sub[N-1] == 'S' and s[N-1] == 'o':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'S' and s[N-1] == 'x':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'o':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'x':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1

    elif ans_sub[0] == 'W' and s[0] == 'x':
        if ans_sub[1] == ans_sub[N-1]:
            if ans_sub[N-1] == 'S' and s[N-1] == 'o':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'S' and s[N-1] == 'x':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'o':
                if ans_sub[0] != ans_sub[N-2]:
                    flag2 = 1
            elif ans_sub[N-1] == 'W' and s[N-1] == 'x':
                if ans_sub[0] == ans_sub[N-2]:
                    flag2 = 1

    if flag2 == 1:
        return 1
    else:
        return 0

for a in first:
    ans_sub = hypothesis(N,s,a[0],a[1])
    flag = conf(ans_sub)
    if flag == 1:
        for x in ans_sub:
            mojiretu += x
        print(mojiretu)
        break
    if flag == 0 and a == first[3]:
        print((-1))


def check(before, center, after, saying):
    return ([center, saying] in [["S", "o"], ["W", "x"]] and before == after)\
           or ([center, saying] in [["S", "x"], ["W", "o"]] and before != after)


def main():
    n = int(input())
    s = list(input())
    ans = "-1"
    for init in ["S", "W"]:
        if ans != "-1":
            break
        for next in ["S", "W"]:
            now_ans = ["" for _ in range(n)]
            now_ans[0] = init
            now_ans[1] = next
            for i in range(1, n - 1):
                if [now_ans[i], s[i]] in [["S", "o"], ["W", "x"]]:
                    now_ans[i + 1] = now_ans[i - 1]
                else:
                    now_ans[i + 1] = "W" if now_ans[i - 1] == "S" else "S"
            if check(now_ans[-2], now_ans[-1], now_ans[0], s[-1]) and check(now_ans[-1], now_ans[0], now_ans[1], s[0]):
                ans = "".join(now_ans)
                break
    print(ans)


def __starting_point():
    main()

__starting_point()

import sys
n = int(input())
s = input()

for ans in [["S", "S"], ["S", "W"], ["W", "S"], ["W", "W"]]:
    for i in range(n-1):
        if s[(i+1)] == "o":
            if ans[i+1] == "S":
                if ans[i] == "S":
                    ans.append("S")
                else:
                    ans.append("W")
            else:
                if ans[i] == "S":
                    ans.append("W")
                else:
                    ans.append("S")
        if s[(i+1)] == "x":
            if ans[i+1] == "S":
                if ans[i] == "S":
                    ans.append("W")
                else:
                    ans.append("S")
            else:
                if ans[i] == "S":
                    ans.append("S")
                else:
                    ans.append("W")

    if ans[0] == ans[-1]:
        ans.pop()
        flag = 0
        if s[0] == "o":
            if ans[0] == "S":
                if ans[-1] == ans[1]:
                    flag = 1
            else:
                if ans[-1] != ans[1]:
                    flag = 1
        else:
            if ans[0] == "W":
                if ans[-1] == ans[1]:
                    flag = 1
            else:
                if ans[-1] != ans[1]:
                    flag = 1
        if flag == 1:
            print(("".join(ans)))
            return
print((-1))


import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = readline().strip()

    ans = -1
    for last, first in ((0, 0), (0, 1), (1, 0), (1, 1)):
        vec = [0] * N
        vec[-1] = last
        vec[0] = first
        for i in range(N):
            if vec[i] == 0:
                if S[i] == 'o':
                    vec[(i + 1) % N] = vec[i - 1]
                else:
                    vec[(i + 1) % N] = 1 - vec[i - 1]
            else:
                if S[i] == 'o':
                    vec[(i + 1) % N] = 1 - vec[i - 1]
                else:
                    vec[(i + 1) % N] = vec[i - 1]

        if vec[-1] == last and vec[0] == first:
            ans = ''.join('S' if a == 0 else 'W' for a in vec)
            break

    print(ans)
    return


def __starting_point():
    main()

__starting_point()

N=int(input())
S=input()

def f(SW,ox,prev):
  if SW=='S':
    if ox == 'o':
      if prev=='S': return 'S'
      else: return 'W'
    else:
      if prev=='S': return 'W'
      else: return 'S'
  else:
    if ox == 'o':
      if prev=='S': return 'W'
      else: return 'S'
    else:
      if prev=='S': return 'S'
      else: return 'W'

combination=[('S','S'),('S','W'),('W','S'),('W','W')]
ok=0
for j in range(4):
  if ok==1:break
  ans=[]
  for i in range(N):
    if i == 0:
      first,last = combination[j]
      ans.append(first)
      now = first
      next_ = f(now,S[i],last)
      continue
    if i == N-1:
      if last == next_ and first==f(next_,S[i],ans[-1]):
        ok=1
        ans.append(next_)
        break
      else:break
    ans.append(next_)
    next_ = f(next_,S[i],ans[-2])
    
if ok==1:
  print(''.join(ans))
else:
  print(-1)

def get_next(sw_prev2,sw_prev1,ox_prev1):
    
    rev_ox = {"o":"x", "x":"o"}
    rev_sw = {"S":"W", "W":"S"}
    
    sw = sw_prev2
    if sw_prev1 == "W": ox_prev1 = rev_ox[ox_prev1]
    if ox_prev1 == "x": sw = rev_sw[sw]
    
    return sw

n = int(input())
ox = input()

ans = [None] * (n+2)
for sw0,sw1 in [("S","S"),("S","W"),("W","S"),("W","W")]:
     
    ans[0] = sw0
    ans[1] = sw1
    
    for i,oxi in enumerate(ox[1:]+ox[0],1):
        ans[i+1] = get_next(ans[i-1],ans[i],oxi)
    
    if ans[0] == ans[-2] and ans[1] == ans[-1]:
        break
else:
    ans = [-1]

print("".join(map(str,ans[:n])))

N = int(input())
S = list(input())
ans = -1
for x in ['SS', 'SW', 'WS', 'WW']:
    for i, s in enumerate(S):
        if s=='o':
            if x[-1]=='S':
                x += x[-2]
            else:
                if x[-2]=='S':
                    x += 'W'
                else:
                    x += 'S'
        else:
            if x[-1] == 'S':
                if x[-2]=='S':
                    x += 'W'
                else:
                    x += 'S'
            else:
                x += x[-2]
    if x[0]==x[-2] and x[1]==x[-1]:
        ans = x[1:-1]
        break
print(ans)

n = int(input())
s = input()
s += s[0]+s[1]
lst = ["SS","SW","WS","WW"]
for x in lst:
    ans = x
    for i in range(1,n+1):
        if (s[i] == "o" and ans[i] == "S") or (s[i] == "x" and ans[i] == "W"):
            if ans[i-1] == "S": ans += "S"
            else: ans += "W"
        else:
            if ans[i-1] == "S": ans += "W"
            else: ans += "S"
    if ans[-2:] == x:
        print(ans[:n])
        return
print(-1)

n = int(input())
s = input()
from itertools import product

for v in product([1,0], repeat=2):
    v = list(v)
    for i in range(n-2):
        if v[i+1]:
            if s[i+1] == 'o':
                v.append(v[i])
            else:
                v.append(not v[i])
        else:
            if s[i+1] == 'o':
                v.append(not v[i])
            else:
                v.append(v[i])
    ans = [0,0]
    for i in range(-1,1):
        if v[i]:
            if s[i] == 'o':
                if v[i-1] == v[i+1]:
                    ans[i+1] = 1
                else:
                    ans[i+1] = 0
            else:
                if v[i-1] == v[i+1]:
                    ans[i+1] = 0
                else:
                    ans[i+1] = 1
        else:
            if s[i] == 'o':
                if v[i-1] == v[i+1]:
                    ans[i+1] = 0
                else:
                    ans[i+1] = 1
            else:
                if v[i-1] == v[i+1]:
                    ans[i+1] = 1
                else:
                    ans[i+1] = 0
    if ans[0] and ans[1]:
        print(''.join(['S' if x == 1 else 'W' for x in v]))
        return
print(-1)

import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


# ワーシャルフロイド (任意の2頂点の対に対して最短経路を求める)
# 計算量n^3 (nは頂点の数)
def warshall_floyd(d, n):
    #d[i][j]: iからjへの最短距離
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d


# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定



# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret


# ここから書き始める
n = int(input())
s = input()
impossible = True
for i in ["S", "W"]:
    for j in ["S", "W"]:
        x = i + j
        # print(x)
        for k in range(1, n - 1):
            if s[k] == "o" and x[-1] == "S":
                if x[-2] == "S":
                    x += "S"
                else:
                    x += "W"
            elif s[k] == "o" and x[-1] == "W":
                if x[-2] == "S":
                    x += "W"
                else:
                    x += "S"
            elif s[k] == "x" and x[-1] == "S":
                if x[-2] == "S":
                    x += "W"
                else:
                    x += "S"
            elif s[k] == "x" and x[-1] == "W":
                if x[-2] == "S":
                    x += "S"
                else:
                    x += "W"
            # if i == "S" and j == "S":
                # print(x, k)
        # print(x)
        ok = True
        if (s[-1] == "o" and x[-1] == "S") or (s[-1] == "x" and x[-1] == "W"):
            if x[-2] != x[0]:
                ok = False
        elif x[-2] == x[0]: 
            ok = False
        if (s[0] == "o" and x[0] == "S") or (s[0] == "x" and x[0] == "W"):
            if x[-1] != x[1]:
                ok = False
        elif x[-1] == x[1]:
            ok = False
        if ok and impossible:
            print(x)
            impossible = False
if impossible:
    print((-1))
    


from itertools import product

N = int(input())
S = input()
for s1, s2 in product('SW', repeat=2):
    temp = s1 + s2
    for s in S[1:N-1]:
        if (s == 'o' and temp[-1] == 'S') or (s == 'x' and temp[-1] == 'W'):
            temp += temp[-2]
        else:
            temp += ''.join(set('SW') - set(temp[-2]))
    for i in [N-1, 0]:
        if S[i] == 'o' and temp[i] == 'S' and temp[(i-1) % N] == temp[(i+1) % N]: continue
        elif S[i] == 'o' and temp[i] == 'W' and temp[(i-1) % N] != temp[(i+1) % N]: continue
        elif S[i] == 'x' and temp[i] == 'S' and temp[(i-1) % N] != temp[(i+1) % N]: continue
        elif S[i] == 'x' and temp[i] == 'W' and temp[(i-1) % N] == temp[(i+1) % N]: continue
        else: break
    else:
        print(temp); break
else:
    print(-1)

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N = int(input())
S = input()

ans = ['S'] * N


def ok(ST):
    ret = ['S'] * N
    ret[-1] = ST[-1]
    ret[0] = ST[0]

    for i in range(0, N - 2):
        if ret[i] == 'S':
            if S[i] == 'o':
                ret[i + 1] = ret[i - 1]
            else:
                ret[i + 1] = 'W' if ret[i - 1] == 'S' else 'S'
        else:
            if S[i] == 'o':
                ret[i + 1] = 'W' if ret[i - 1] == 'S' else 'S'
            else:
                ret[i + 1] = ret[i - 1]

    for i in range(N):
        if S[i] == 'o' and ret[i] == 'S' and ret[i - 1] != ret[(i + 1) % N]:
            return False
        if S[i] == 'o' and ret[i] == 'W' and ret[i - 1] == ret[(i + 1) % N]:
            return False
        if S[i] == 'x' and ret[i] == 'S' and ret[i - 1] == ret[(i + 1) % N]:
            return False
        if S[i] == 'x' and ret[i] == 'W' and ret[i - 1] != ret[(i + 1) % N]:
            return False

    return "".join(ret)


def solve():
    for s in ["SS", "SW", "WS", "WW"]:
        r = ok(s)
        if r:
            print(r)
            return

    print(-1)


solve()

def abc055_d():
    n = int(input())
    s = str(input())
    ss = s[-1] + s + s[0]

    def solve(ini1, ini0):
        res = [None] * (n+2)
        res[1] = ini1
        res[0] = ini0
        for i in range(1, n+1):
            if ss[i] == 'o':
                if res[i] == 'S' and res[i-1] == 'S': res[i+1] = 'S'
                if res[i] == 'S' and res[i-1] == 'W': res[i+1] = 'W'
                if res[i] == 'W' and res[i-1] == 'S': res[i+1] = 'W'
                if res[i] == 'W' and res[i-1] == 'W': res[i+1] = 'S'
            else:
                if res[i] == 'S' and res[i-1] == 'S': res[i+1] = 'W'
                if res[i] == 'S' and res[i-1] == 'W': res[i+1] = 'S'
                if res[i] == 'W' and res[i-1] == 'S': res[i+1] = 'S'
                if res[i] == 'W' and res[i-1] == 'W': res[i+1] = 'W'
        return res

    ans = '-1'
    ini = [('S','S'), ('S','W'), ('W','S'), ('W','W')]
    for ini1, ini0 in ini:
        res = solve(ini1, ini0)
        if res[0] == res[n] and res[1] == res[n+1]:
            ans = ''.join(res[1:n+1])
            break
    print(ans)

def __starting_point():
    abc055_d()
__starting_point()

N = int(input())
s = list(str(input()))

x = [0]*N
v = ["S","W"]

for x[0],x[1] in [["S","S"],["S","W"],["W","S"],["W","W"]]:
    for i in range(2,N):
        if (x[i-1] =="S" and s[i-1] == "o") or (x[i-1] =="W" and s[i-1] == "x"):
            x[i] = x[i-2]
        else:
            if x[i-2] == "S":
                x[i] = "W"
            else:
                x[i] = "S"
    #print(x)
    det = 0
    if (x[N-1] == "S" and s[N-1] == "o" and x[N-2] != x[0]):
        det = -1
    elif (x[N-1] == "S" and s[N-1] == "x" and x[N-2] == x[0]):
        det = -1
    elif (x[N-1] == "W" and s[N-1] == "o" and x[N-2] == x[0]):
        det = -1
    elif (x[N-1] == "W" and s[N-1] == "x" and x[N-2] != x[0]):
        det = -1
    elif (x[0] == "S" and s[0] == "o" and x[N-1] != x[1]):
        det = -1
    elif (x[0] == "S" and s[0] == "x" and x[N-1] == x[1]):
        det = -1
    elif (x[0] == "W" and s[0] == "o" and x[N-1] == x[1]):
        det = -1
    elif (x[0] == "W" and s[0] == "x" and x[N-1] != x[1]):
        det = -1
    
    if det == 0:
        print(("".join(x)))
        break

if det == -1:
    print((-1))


n = int(input())
s = input()
a = ["SS", "SW", "WS", "WW"]
for i in a:
    ans = i
    for j in range(n - 2):
        if ans[j + 1] == "S":
            if s[j + 1] == "o":
                if ans[j] == "S":
                    ans += "S"
                else:
                    ans += "W"
            else:
                if ans[j] == "S":
                    ans += "W"
                else:
                    ans += "S"
        else:
            if s[j + 1] == "o":
                if ans[j] == "S":
                    ans += "W"
                else:
                    ans += "S"
            else:
                if ans[j] == "S":
                    ans += "S"
                else:
                    ans += "W"
    flag = True
    if ans[n - 1] == "S":
        if s[n - 1] == "o":
            if ans[n - 2] != ans[0]:
                flag = False
        else:
            if ans[n - 2] == ans[0]:
                flag = False
    else:
        if s[n - 1] == "o":
            if ans[n - 2] == ans[0]:
                flag = False
        else:
            if ans[n - 2] != ans[0]:
                flag = False
    if ans[0] == "S":
        if s[0] == "o":
            if ans[n - 1] != ans[1]:
                flag = False
        else:
            if ans[n - 1] == ans[1]:
                flag = False
    else:
        if s[0] == "o":
            if ans[n - 1] == ans[1]:
                flag = False
        else:
            if ans[n - 1] != ans[1]:
                flag = False
    if flag == True:
        print(ans)
        break
    else:
        continue
else:
    print(-1)

n = int(input())
s = input()
s += s[0]
d = {'S':'W', 'W':'S'}
flag = True
for sw in ['SS', 'WW', 'SW', 'WS']:
    l = sw
    for i in range(1, n+1):
        if l[i] == 'S' and s[i] == 'o' or l[i] == 'W' and s[i] == 'x':
            l += l[i-1]
        else:
            l += d[l[i-1]]
    if l[0] == l[-2] and l[1] == l[-1] :
        print((l[:-2]))
        flag = False
        break
if flag:
    print((-1))



def get_next(sw_prev2,sw_prev1,ox_prev1):
    
    rev_ox = {"o":"x", "x":"o"}
    rev_sw = {"S":"W", "W":"S"}
    
    sw = sw_prev2
    if sw_prev1 == "W": ox_prev1 = rev_ox[ox_prev1]
    if ox_prev1 == "x": sw = rev_sw[sw]
    
    return sw

n = int(input())
ox = input()

for sw0,sw1 in [("S","S"),("S","W"),("W","S"),("W","W")]:
    ans = ""
    ans = sw0+sw1
    for i,oxi in enumerate(ox[1:]+ox[0],1):
        ans += get_next(ans[i-1],ans[i],oxi)
    
    if ans[0] == ans[-2] and ans[1] == ans[-1]:
        ans = ans[:-2]
        break
else:
    ans = -1

print(ans)

# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------

def check(a0, a1):
    b0,b1 = a0,a1
    Ans = a1
    for i in range(N):
        # 羊
        if a1 == "S":
            # 両隣が同じ
            if S[i] == "o":
                a2 = a0
            else:
                a2 = B[a0]
        # 狼
        else:
            # 両隣が異なる
            if S[i] == "o":
                a2 = B[a0]
            else:
                a2 = a0
        Ans += a2
        a0,a1 = a1,a2
    if Ans[0] == Ans[N] and Ans[0] == b1 and Ans[N-1] == b0:
        return Ans[0:N]
    else:
        return -1

# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
S = input().rstrip()

B = {"S":"W", "W":"S"}
S0S1 = [("S","S"), ("S","W"), ("W","S"), ("W","W")]

for s0,s1 in S0S1:
    Ans = check(s0,s1)
    if Ans != -1:
        print(Ans)
        return

print((-1))



N=int(input())
S=list(str(input()))
hyp=[["S","S"],["S","W"],["W","S"],["W","W"]]
flag=0
for i in range(4):
    if flag==2:
        break
    flag=0
    ans=[]
    ans.append(hyp[i][0])
    ans.append(hyp[i][1])
    for j in range(1,N+1):
        if j>=N-1:
            if j==N:
                j=0
                t=1
            else:
                t=0
            
            if ans[j]=="S":
                if S[j]=="o":
                    if ans[j-1]=="S":
                        if ans[t]=="S":
                            flag+=1
                    else:
                        if ans[t]=="W":
                            flag+=1
                else:
                    if ans[j-1]=="S":
                        if ans[t]=="W":
                            flag+=1
                    else:
                        if ans[t]=="S":
                            flag+=1
            else:
                if S[j]=="o":
                    if ans[j-1]=="S":
                        if ans[t]=="W":
                            flag+=1
                    else:
                        if ans[t]=="S":
                            flag+=1
                else:
                    if ans[j-1]=="S":
                        if ans[t]=="S":
                            flag+=1
                    else:
                        if ans[t]=="W":
                            flag+=1
                            
        else:
            if ans[j]=="S":
                if S[j]=="o":
                    if ans[j-1]=="S":
                        ans.append("S")
                    else:
                        ans.append("W")
                else:
                    if ans[j-1]=="S":
                        ans.append("W")
                    else:
                        ans.append("S")
            else:
                if S[j]=="o":
                    if ans[j-1]=="S":
                        ans.append("W")
                    else:
                        ans.append("S")
                else:
                    if ans[j-1]=="S":
                        ans.append("S")
                    else:
                        ans.append("W")

if flag!=2:
    print(-1)
else:
    for i in range(len(ans)):
        if i!=len(ans)-1:
            print(ans[i],end="")
        else:
            print(ans[i])
            

n = int(input())
s = input()

for p1,p2 in [(True,True),(True,False),(False,True),(False,False)]:
  ans = []
  ans.extend([p1,p2])  
  for i in range(1,n-1):
    if ans[i] == True:
      if s[i]=='o':
        ans.append(ans[-2])
      else:
        ans.append(not ans[-2])
    else:
      if s[i]=='o':
        ans.append(not ans[-2])
      else:
        ans.append(ans[-2])
  
  f = False
  if ans[-1]==True:
    if s[-1]=='o' and ans[-2]==ans[0]:        
      f = True
    if s[-1]=='x' and ans[-2]!=ans[0]:      
      f = True
  else:
    if s[-1]=='o' and ans[-2]!=ans[0]:
      f = True
    if s[-1]=='x' and ans[-2]==ans[0]:
      f = True
      
  if f:    
    if ans[0] and s[0]=='o' and ans[1] == ans[-1]:
      break
    if ans[0] and s[0]=='x' and ans[1] != ans[-1]:
      break
    if not ans[0] and s[0]=='o' and ans[1] != ans[-1]:
      break
    if not ans[0] and s[0]=='x' and ans[1] == ans[-1]:
      break
  ans = []
  
if len(ans)>0:
  print(''.join(['S' if a else 'W' for a in ans] ))
else:
  print(-1)

def main():
    # import sys
    # readline = sys.stdin.buffer.readline
    # readlines = sys.stdin.buffer.readlines
    N = int(input())
    L = input()

    A = [None] * (N + 2)
    for a0, a1 in [(0, 0), (0, 1), (1, 0), (1, 1)]:
        A[0] = a0
        A[1] = a1
        for i in range(2, N + 1):
            a = A[i - 1]
            s = (L[i - 1] == 'x')
            A[i] = A[i - 2] ^ (a ^ s)
        A[N + 1] = A[N - 1] ^ (A[N] ^ (L[0] == 'x'))
        if A[0] == A[N] and A[1] == A[N + 1]:
            exists = True
            break
    else:
        exists = False

    if exists:
        ans = []
        for i in range(N):
            c = 'W' if A[i] else 'S'
            ans.append(c)
        print((''.join(ans)))
    else:
        print((-1))


def __starting_point():
    main()

__starting_point()

import copy

n = int(input())
s = input()

flag = False
begin_list = [["S", "S"], ["W", "S"], ["S", "W"], ["W", "W"]]

for i in range(4):
  sub = copy.deepcopy(begin_list[i])
  judge = True
  for j in range(2, n):
    if s[j-1] == "o":
      if sub[j-1] == "S":
        if sub[j-2] == "S":
          sub.append("S")
        else:
          sub.append("W")
      else:
        if sub[j-2] == "S":
          sub.append("W")
        else:
          sub.append("S")
    else:
      if sub[j-1] == "S":
        if sub[j-2] == "S":
          sub.append("W")
        else:
          sub.append("S")
      else:
        if sub[j-2] == "S":
          sub.append("S")
        else:
          sub.append("W")
  if s[-1] == "o":
    if (sub[-1] == "S" and sub[-2] != sub[0]) or (sub[-1] == "W" and sub[-2] == sub[0]):
      continue
  else:
    if (sub[-1] == "S" and sub[-2] == sub[0]) or (sub[-1] == "W" and sub[-2] != sub[0]):
      continue
  if s[0] == "o":
    if (sub[0] == "S" and sub[-1] != sub[1]) or (sub[0] == "W" and sub[-1] == sub[1]):
      continue
  else:
    if (sub[0] == "S" and sub[-1] == sub[1]) or (sub[0] == "W" and sub[-1] != sub[1]):
      continue
  flag = True
  break

if flag:
  print("".join(sub))
else:
  print(-1)

def main():
    n = int(input())
    s = input()
    for t in ["SS", "SW", "WS", "WW"]:
        for i in s[1:-1]:
            if t[-1] == "S":
                if i == "o":
                    t += t[-2]
                else:
                    t += "S" if t[-2] == "W" else "W"
            else:
                if i == "x":
                    t += t[-2]
                else:
                    t += "S" if t[-2] == "W" else "W"
        # check1
        if t[0] == "S":
            if s[0] == "o":
                f = t[-1] == t[1]
            else:
                f = t[-1] != t[1]
        else:
            if s[0] == "x":
                f = t[-1] == t[1]
            else:
                f = t[-1] != t[1]

        # check2
        if t[-1] == "S":
            if s[-1] == "o":
                g = t[-2] == t[0]
            else:
                g = t[-2] != t[0]
        else:
            if s[-1] == "x":
                g = t[-2] == t[0]
            else:
                g = t[-2] != t[0]

        if f and g:
            print(t)
            break

    else:
        print((-1))


def __starting_point():
    main()

__starting_point()

N = int(input())
S = input()
a = ["SS","SW","WS","WW"]

for i in range(N):
  for j in range(4):
    a[j]+="SW"[::-1 if S[i]=="o" else 1][a[j][i]==a[j][i+1]]

for i in range(4):
  if a[i][1]==a[i][N+1] and a[i][0]==a[i][N]:
    print(a[i][1:N+1])
    break
else:
  print(-1)

N=int(input())
slist=[x=="o" for x in input()]
#print(slist)

answer_list=[0]*N

ok=False
for p1,p2 in [(1,1),(1,-1),(-1,1),(-1,-1)]:
  answer_list[0]=p1
  answer_list[1]=p2
  
  for i in range(2,N):
    if answer_list[i-1]==1:
      if slist[i-1]:
        answer_list[i]=answer_list[i-2]
      else:
        answer_list[i]=-answer_list[i-2]
    else:
      if slist[i-1]:
        answer_list[i]=-answer_list[i-2]
      else:
        answer_list[i]=answer_list[i-2]
        
  contra=False
  for i in range(N):
    l=(i-1)%N
    r=(i+1)%N
    if answer_list[i]==1:
      if slist[i]:
        if answer_list[l]!=answer_list[r]:
          contra=True
      else:
        if answer_list[l]==answer_list[r]:
          contra=True
    else:
      if slist[i]:
        if answer_list[l]==answer_list[r]:          
          contra=True
      else:
        if answer_list[l]!=answer_list[r]:
          contra=True

  if not contra:
    ok=True
    break
    
if ok:
  sw_list=[]
  for ans in answer_list:
    if ans==1:
      sw_list.append("S")
    else:
      sw_list.append("W")
  print("".join(sw_list))
else:
  print(-1)

d = {"WWo": "S",
     "WSo": "W",
     "SWo": "W",
     "SSo": "S",
     "WWx": "W",
     "WSx": "S",
     "SWx": "S",
     "SSx": "W",
    }

combo = ["SS","SW","WS","WW"]

N = int(input())
z = input()

matched = False
txt = []
for c in combo:
  keep = c[0]
  left = c
  txt = []
  for i in range(N):
    txt.append(left[1])
    new_ch = d[left+z[i]]
    left = left[1] + new_ch
  if left == c:
    matched = True
    break

if matched:
  print(*txt,sep="")
else:
  print("-1")

n = int(input())
s = input()
a = "SS"
ct=1
while ct<7:    
    for i in range(n-1):
        p=a[i]
        q="A"
        if a[i]=="S":
            q="W"
        else:
            q="S"
        if a[i+1]=="S":
            if s[i+1] == "o":
                a=a+a[i]
            else:
                a=a+q
        else:
            if s[i+1] == "o":
                 a=a+q
            else:
                a=a+a[i]
    if a[0]==a[n]:
        if a[0]=="S" and s[0]=="o" and a[n-1]==a[1]:
            print(a[0:n])
            break
        elif a[0]=="S" and s[0] !="o" and a[n-1]!=a[1]:         
            print(a[0:n])
            break
        elif a[0]=="W" and s[0] =="o" and a[n-1]!=a[1]: 
            print(a[0:n])
            break
        elif a[0]=="W" and s[0] !="o" and a[n-1]==a[1]: 
            print(a[0:n])
            break
        else:
            ct=ct+1
        if ct==2:
            a="SW"
        elif ct==3:
            a="WS"
        elif ct==4:
            a="WW"
        else:
            print(-1)
            break
    else:
        ct=ct+1
        if ct==2:
            a="SW"
        elif ct==3:
            a="WS"
        elif ct==4:
            a="WW"
        else:
            print(-1)
            break

n = int(input())
s = input()

start = ["SS", "SW", "WS", "WW"]

for st in start:
    ans = st
    for i in range(1, n):
        if s[i] == "o" and ans[i] == "S":
            if ans[i-1] == "S":
                ans += "S"
            else:
                ans += "W"
        elif s[i] == "x" and ans[i] == "S":
            if ans[i-1] == "S":
                ans += "W"
            else:
                ans += "S"
        elif s[i] == "o" and ans[i] == "W":
            if ans[i-1] == "S":
                ans += "W"
            else:
                ans += "S"
        elif s[i] == "x" and ans[i] == "W":
            if ans[i-1] == "S":
                ans += "S"
            else:
                ans += "W"

    if ans[0] == ans[-1]:
        ans = ans[:n]
        ok = False
        if s[0] == "o" and ans[0] == "S":
            if ans[-1] == ans[1]:
                ok = True
        elif s[0] == "x" and ans[0] == "S":
            if ans[-1] != ans[1]:
                ok = True
        elif s[0] == "o" and ans[0] == "W":
            if ans[-1] != ans[1]:
                ok = True
        elif s[0] == "x" and ans[0] == "W":
            if ans[-1] == ans[1]:
                ok = True
        if ok:
            print(ans[:n])
            return
print(-1)

N = int(input())
s = input()

init = ["SS", "SW", "WS", "WW"]
next_animal = { ("S","o","S"):"S",
                ("S","o","W"):"W",
                ("S","x","S"):"W",
                ("S","x","W"):"S",
                ("W","o","S"):"W",
                ("W","o","W"):"S",
                ("W","x","S"):"S",
                ("W","x","W"):"W"}
for X in init:
    SW = X
    for i in range(1,N):
        SW += next_animal[SW[i],s[i],SW[i-1]]
    ls = len(SW)
    if SW[0] == SW[ls-1] and next_animal[SW[0],s[0],SW[ls-2]] == SW[1]:
        print((SW[:ls-1]))
        break
else:
    print((-1)) 


n=int(input())
s=list(input())
s=s+s
x=[["S","S"],["S","W"],["W","S"],["W","W"]]

for temp1 in x:
    if s[0]=="o":
        c=temp1[1]
    else:
        if temp1[1]=="S":
            c="W"
        else:
            c="S"
    for i in range(1,n+1):
        if s[i]=="o":
            if temp1[i]=="S":
                temp1.append(temp1[i-1])
                
            else:
                if temp1[i-1]=="S":
                    temp1.append("W")
                else:
                    temp1.append("S")
        else:
            if temp1[i]=="W":
                temp1.append(temp1[i-1])
            else:
                if temp1[i-1]=="W":
                    temp1.append("S")
                else:
                    temp1.append("W")
    
    
    if temp1[0]==temp1[-2] and temp1[1]==temp1[-1]:
        print("".join(temp1[:n]))
        return
print(-1)

import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    s = input()
    L = ["S", "W"]

    for first in L:
        for second in L:
            res = ["" for _ in range(n)]
            res[0] = first
            res[1] = second
            for i in range(1, n - 1):
                if s[i] == "o":
                    if res[i] == "S" and res[i - 1] == "S":
                        res[i + 1] = "S"
                    elif res[i] == "S" and res[i - 1] == "W":
                        res[i + 1] = "W"
                    elif res[i] == "W" and res[i - 1] == "W":
                        res[i + 1] = "S"
                    else:
                        res[i + 1] = "W"
                else:
                    if res[i] == "S" and res[i - 1] == "S":
                        res[i + 1] = "W"
                    elif res[i] == "S" and res[i - 1] == "W":
                        res[i + 1] = "S"
                    elif res[i] == "W" and res[i - 1] == "W":
                        res[i + 1] = "W"
                    else:
                        res[i + 1] = "S"

            if s[-1] == "o":
                if (res[-1] == "S" and res[-2] != res[0]) or (res[-1] == "W" and res[-2] == res[0]):
                    continue
            else:
                if (res[-1] == "S" and res[-2] == res[0]) or (res[-1] == "W" and res[-2] != res[0]):
                    continue

            if s[0] == "o":
                if (res[0] == "S" and res[-1] != res[1]) or (res[0] == "W" and res[-1] == res[1]):
                    continue
            else:
                if (res[0] == "S" and res[-1] == res[1]) or (res[0] == "W" and res[-1] != res[1]):
                    continue

            print(("".join(res)))
            break
        else:
            continue
        break
    else:
        print((-1))


def __starting_point():
    resolve()

__starting_point()

N=int(input())
S=input()
S=[1 if S[i]=='o' else -1 for i in range(N)]

#0番目は羊のパターン
tmp=[0]*N
tmp[0]=1
if S[0]==1: #0番目の両隣は同種
  #0番目の両隣は羊
  tmp[1]=1
  tmp[N-1]=1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
    
  #0番目の両隣は狼
  tmp[1]=-1
  tmp[N-1]=-1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
else: #0番目の両隣は異種
  #1番目が羊, N-1番目が狼
  tmp[1]=1
  tmp[N-1]=-1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
  #1番目が狼, N-1番目が羊
  tmp[1]=-1
  tmp[N-1]=1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
#0番目は狼のパターン
tmp=[0]*N
tmp[0]=-1
if S[0]==-1: #0番目の両隣は同種
  #0番目の両隣は羊
  tmp[1]=1
  tmp[N-1]=1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
    
  #0番目の両隣は狼
  tmp[1]=-1
  tmp[N-1]=-1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
else: #0番目の両隣は異種
  #1番目が羊, N-1番目が狼
  tmp[1]=1
  tmp[N-1]=-1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
  #1番目が狼, N-1番目が羊
  tmp[1]=-1
  tmp[N-1]=1
  
  for i in range(2, N-1):
    tmp[i]=tmp[i-1]*tmp[i-2]*S[i-1]
    
  if tmp[N-1]==tmp[N-2]*tmp[N-3]*S[N-2] and tmp[0]==tmp[N-1]*tmp[N-2]*S[N-1]:
    ans=['S' if tmp[i]==1 else 'W' for i in range(N)]
    print(''.join(ans))
    return
  
print(-1)

def d_menagerie():
    N = int(input())
    S = input()

    s = S + S[:2]  # 円環状に並んでいることを考慮
    for ans in ('SS', 'SW', 'WS', 'WW'):  # Sheep, Wolf について1番と2番の種類を仮定する
        for i in range(1, N + 1):
            if (ans[-1] == 'S' and s[i] == 'o') or (ans[-1] == 'W' and s[i] == 'x'):
                # この場合，今注目している動物の両隣は同じ種類．
                # よって，今注目している動物の右隣を左隣と同じにする．
                ans += ans[-2]
            else:
                # 両隣は違う種類．右隣を左隣と逆にする．
                ans += ('S' if ans[-2] == 'W' else 'W')
        if ans[:2] == ans[N:]:
            # sの最初の2文字(仮定)と最後の2文字が一致した文字列のみ受理する．
            return ans[:N]
    return '-1'  # どの割り当て方も矛盾した

print(d_menagerie())

n = int(input())
s = list(input())
u = ["S", "W"]
for i in range(2):
    for j in range(2):
        ans = [0] * n
        ans[0] = u[i]
        ans[1] = u[j]
        for k in range(2, n):
            if s[k - 1] == "o":
                if ans[k - 1] == "S":
                    if ans[k - 2] == "S":
                        c = 0
                    else:
                        c = 1
                else:
                    if ans[k - 2] == "S":
                        c = 1
                    else:
                        c = 0
            else:
                if ans[k - 1] == "S":
                    if ans[k - 2] == "S":
                        c = 1
                    else:
                        c = 0
                else:
                    if ans[k - 2] == "S":
                        c = 0
                    else:
                        c = 1
            ans[k] = u[c]
        m = 0
        if s[0] == "o":
            if ans[0] == "S":
                if ans[1] == ans[n - 1]:
                    m += 1
            else:
                if ans[1] != ans[n - 1]:
                    m += 1
        else:
            if ans[0] == "W":
                if ans[1] == ans[n - 1]:
                    m += 1
            else:
                if ans[1] != ans[n - 1]:
                    m += 1
        if s[n - 1] == "o":
            if ans[n - 1] == "S":
                if ans[0] == ans[n - 2]:
                    m += 1
            else:
                if ans[0] != ans[n - 2]:
                    m += 1
        else:
            if ans[n - 1] == "W":
                if ans[0] == ans[n - 2]:
                    m += 1
            else:
                if ans[0] != ans[n - 2]:
                    m += 1
        if m == 2:
            print("".join(ans))
            return
print(-1)

import itertools

N = int(input())
S = [True if x == 'o' else False for x in input()]
S.append(S[0])
S.append(S[1])
lst = [None] * (N + 2)
for x0, x1 in itertools.product((True, False), repeat=2):
    lst[0], lst[1] = x0, x1
    for i in range(1, N + 1):
        lst[i + 1] = lst[i] ^ S[i] ^ lst[i - 1]
    if (lst[N], lst[N + 1]) == (lst[0], lst[1]):
        print((''.join(map(str, ('S' if x else 'W' for x in lst[:-2])))))
        break
else:
    print((-1))


#!python3

# input
N = int(input())
s = input()

d = {"S": "W", "W": "S"}


def f(x, y, i, j):
    if y == "S":
        if s[j] == "o":
            return x
        else:
            return d[x]
    else:
        if s[j] == "o":
            return d[x]
        else:
            return x


def solve(t):
    l = [None] * N
    l[0], l[1] = t
    l[-1] = f(l[1], l[0], 1, 0)
    for i in range(2, N - 1):
        l[i] = f(l[i - 2], l[i - 1], i - 2, i - 1)
    x = f(l[-3], l[-2], -3, -2)
    y = f(l[-2], l[-1], -2, -1)
    if x == l[-1] and y == l[0]:
        return l
    else:
        return None
        

def main():
    l = [("S", "S"), ("S", "W"), ("W", "S"), ("W", "W")]
    ans = None
    for t in l:
        ans = solve(t)
        if ans is not None:
            break
    if ans is None:
        print((-1))
    else:
        print(("".join(ans)))
    

def __starting_point():
    main()

__starting_point()

N = int(input())
S = str(input())

animal = ["S", "W"]

start = [[0, 0], [0, 1], [1, 0], [1, 1]]#最初の2つを指定

for i, j in start:
  ans = [-1] * N
  ans[0] = i
  ans[1] = j
  p = 0
  for k in range(N - 1):
    #print(ans)
    if p == 0:
      if k == 0:
        if S[k] == "o":
          if ans[k] == 0:
            ans[-1] = ans[1]
          else:
            ans[-1] = 1 - ans[1]
        else:
          if ans[k] == 0:
            ans[-1] = 1 - ans[1]
          else:
            ans[-1] = ans[1]
      else:
        if S[k] == "o":
          if ans[k] == 0:
            now = ans[k - 1]
            if ans[k + 1] == 1 - now:
              p = 1
            else:
              ans[k + 1] = now
          else:
            now = 1 - ans[k - 1]
            if ans[k + 1] == 1 - now:
              p = 1
            else:
              ans[k + 1] = now            
        else:
          if ans[k] == 0:
            now = 1 - ans[k - 1]
            if ans[k + 1] == 1 - now:
              p = 1
            else:
              ans[k + 1] = now
          else:
            now = ans[k - 1]
            if ans[k + 1] == 1 - now:
              p = 1
            else:
              ans[k + 1] = now
  
  #N == 3の時に備えて
  if ans[-1] == 0:
    if S[-1] == "o":
      if ans[-2] != ans[0]:
        p = 1
    else:
      if ans[-2] == ans[0]:
        p = 1
  else:
    if S[-1] == "o":
      if ans[-2] == ans[0]:
        p = 1
    else:
      if ans[-2] != ans[0]:
        p = 1
  
  if p == 0:
    #print(ans)  
    for i in range(N):
      if ans[i] == 0:
        print("S", end = "")
      else:
        print("W", end = "")
    return
    
print(-1)
            
        
        
        
        
          
          
          
          

N = int(input())
s = str(input())
A = ''

def majikayo():
    k = 0
    if A[0] == 'S' and s[0] == 'o':
        if A[-1] == 'S' and s[-1] == 'o':
            if A[1] == 'S' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'S' and s[-1] == 'x':
            if A[1] == 'S' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'o':
            if A[1] == 'W' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'x':
            if A[1] == 'W' and A[-2] == 'S':
                k = 1
    elif A[0] == 'S' and s[0] == 'x':
        if A[-1] == 'S' and s[-1] == 'o':
            if A[1] == 'W' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'S' and s[-1] == 'x':
            if A[1] == 'W' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'o':
            if A[1] == 'S' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'x':
            if A[1] == 'S' and A[-2] == 'S':
                k = 1
    elif A[0] == 'W' and s[0] == 'o':
        if A[-1] == 'S' and s[-1] == 'o':
            if A[1] == 'W' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'S' and s[-1] == 'x':
            if A[1] == 'W' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'o':
            if A[1] == 'S' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'x':
            if A[1] == 'S' and A[-2] == 'W':
                k = 1
    elif A[0] == 'W' and s[0] == 'x':
        if A[-1] == 'S' and s[-1] == 'o':
            if A[1] == 'S' and A[-2] == 'W':
                k = 1
        elif A[-1] == 'S' and s[-1] == 'x':
            if A[1] == 'S' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'o':
            if A[1] == 'W' and A[-2] == 'S':
                k = 1
        elif A[-1] == 'W' and s[-1] == 'x':
            if A[1] == 'W' and A[-2] == 'W':
                k = 1
    if k == 1:
        return 1

A = 'SS'
for i in range(1,N-1):
    if s[i] == 'o' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
    elif s[i] == 'o' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
if majikayo() == 1:
    print(A)
else:
    A = 'SW'
    for i in range(1,N-1):
        if s[i] == 'o' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
        elif s[i] == 'o' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
    if majikayo() == 1:
        print(A)
    else:
        k = 0
        A = 'WS'
        for i in range(1,N-1):
            if s[i] == 'o' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
            elif s[i] == 'o' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
        majikayo()
        if majikayo() == 1:
            print(A)
        else:
            k = 0
            A = 'WW'
            for i in range(1,N-1):
                if s[i] == 'o' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
                elif s[i] == 'o' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
            if majikayo() == 1:
                print(A)
            else:
                print((-1))


import sys
import collections

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 5)


def solve(S, ans, N):
    f = False
    ff = False
    for i in range(1, N):
        if i == N - 1:
            if S[i] == "o" and ans[i] == "S":
                if ans[i - 1] == ans[0]:
                    f = True
            if S[i] == "o" and ans[i] == "W":
                if ans[i - 1] != ans[0]:
                    f = True
            if S[i] == "x" and ans[i] == "S":
                if ans[i - 1] != ans[0]:
                    f = True
            if S[i] == "x" and ans[i] == "W":
                if ans[i - 1] == ans[0]:
                    f = True
        elif i == N - 2:
            if S[i] == "o" and ans[i] == "S":
                if ans[i - 1] == ans[i + 1]:
                    ff = True
            if S[i] == "o" and ans[i] == "W":
                if ans[i - 1] != ans[i + 1]:
                    ff = True
            if S[i] == "x" and ans[i] == "S":
                if ans[i - 1] != ans[i + 1]:
                    ff = True
            if S[i] == "x" and ans[i] == "W":
                if ans[i - 1] == ans[i + 1]:
                    ff = True
        else:
            if S[i] == "o" and ans[i] == "S":
                ans[i + 1] = ans[i - 1]
            if S[i] == "o" and ans[i] == "W":
                if ans[i - 1] == "S":
                    ans[i + 1] = "W"
                else:
                    ans[i + 1] = "S"
            if S[i] == "x" and ans[i] == "S":
                if ans[i - 1] == "S":
                    ans[i + 1] = "W"
                else:
                    ans[i + 1] = "S"
            if S[i] == "x" and ans[i] == "W":
                ans[i + 1] = ans[i - 1]

    return f and ff, ans


def main():
    N = int(input())
    S = input().strip()

    ans = [""] * N
    ans[0] = "S"
    if S[0] == "o":
        ans[-1] = "S"
        ans[1] = "S"
    else:
        ans[-1] = "S"
        ans[1] = "W"
    f, ans = solve(S, ans, N)
    if f:
        print(("".join(ans)))
        return

    ans = [""] * N
    ans[0] = "S"
    if S[0] == "o":
        ans[-1] = "W"
        ans[1] = "W"
    else:
        ans[-1] = "W"
        ans[1] = "S"
    f, ans = solve(S, ans, N)
    if f:
        print(("".join(ans)))
        return

    ans = [""] * N
    ans[0] = "W"
    if S[0] == "o":
        ans[-1] = "S"
        ans[1] = "W"
    else:
        ans[-1] = "S"
        ans[1] = "S"
    f, ans = solve(S, ans, N)
    if f:
        print(("".join(ans)))
        return

    ans = [""] * N
    ans[0] = "W"
    if S[0] == "o":
        ans[-1] = "W"
        ans[1] = "S"
    else:
        ans[-1] = "W"
        ans[1] = "W"
    f, ans = solve(S, ans, N)
    if f:
        print(("".join(ans)))
        return

    print((-1))


def __starting_point():
    main()

__starting_point()

n = int(input())
s = input()

def sw(sl,dp):
    for i in range(1,n-1):
        if sl[i]=="o" and dp[i]=="S":
            dp[i+1] =dp[i-1]
        elif sl[i] =="o" and dp[i]=="W":
            if dp[i-1] =="S":
                dp[i+1] = "W"
            else:
                dp[i+1] = "S"
        elif sl[i]=="x" and dp[i]=="S":
            if dp[i-1] =="S":
                dp[i+1] = "W"
            else:
                dp[i+1] = "S"
        else:
            dp[i+1] = dp[i-1]

sl = list(s)
dp =[0]*n
dp[0]="S"
dp[1]="S"
sw(sl,dp)
if sl[0] =="o":
    if dp[n-1] =="W":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="S":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="S":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
else:
    if dp[n-1] =="S":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="W":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="W":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass

dp =[0]*n
dp[0]="S"
dp[1]="W"
sw(sl,dp)
if sl[0] =="o":
    if dp[n-1] =="S":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="W":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="W":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
else:
    if dp[n-1] =="W":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="S":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="S":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
    
dp =[0]*n
dp[0]="W"
dp[1]="S"
sw(sl,dp)
if sl[0] =="o":
    if dp[n-1] =="S":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="S":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="S":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
else:
    if dp[n-1] =="W":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="W":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="W":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
        
dp =[0]*n
dp[0]="W"
dp[1]="W"
sw(sl,dp)
if sl[0] =="o":
    if dp[n-1] =="W":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="W":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="W":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass
else:
    if dp[n-1] =="S":
        pass
    elif sl[n-1] =="x":
        if dp[n-2] =="S":
            pass
        else:
            res = ''.join(dp)
            print(res)
            return
    elif sl[n-1] =="o":
        if dp[n-2] =="S":
            res = ''.join(dp)
            print(res)
            return
        else:
            pass

print(-1)

N=int(input())
S=list(input().rstrip())
for i in range(N):
  if S[i]=='o': S[i]=True
  else: S[i]=False
S.append(S[0])
A=[True]*(N+2)
for a in [[True,True],[True,False],[False,True],[False,False]]:
  A[0],A[1]=a[0],a[1]
  for j in range(1,N+1):
    if A[j] ^ S[j]:
      A[j+1]=not A[j-1]
    else:
      A[j+1]=A[j-1]
  if A[0]==A[-2] and A[1]==A[-1]:
    for k in range(N):
      if A[k]: A[k]='S'
      else: A[k]='W'
    print("".join(A[:N]))
    return
print(-1)

N = int(input())
s = str(input())
A = ''

def majikayo():
    flag2 = 0
    if A[0] == 'S' and s[0] == 'o':
        if A[1] == A[N-1]:
            #繰り返しゾーン
            #---------------------------------------------↓
            if A[N-1] == 'S' and s[N-1] == 'o':
                if A[0] == A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'S' and s[N-1] == 'x':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'o':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'x':
                if A[0] == A[N-2]:
                    flag2 = 1
            #---------------------------------------------↑

    elif A[0] == 'S' and s[0] == 'x':
        if A[1] != A[N-1]:
            #---------------------------------------------↓
            if A[N-1] == 'S' and s[N-1] == 'o':
                if A[0] == A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'S' and s[N-1] == 'x':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'o':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'x':
                if A[0] == A[N-2]:
                    flag2 = 1
            #---------------------------------------------↑

    elif A[0] == 'W' and s[0] == 'o':
        if A[1] != A[N-1]:
            #---------------------------------------------↓
            if A[N-1] == 'S' and s[N-1] == 'o':
                if A[0] == A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'S' and s[N-1] == 'x':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'o':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'x':
                if A[0] == A[N-2]:
                    flag2 = 1
            #---------------------------------------------↑

    elif A[0] == 'W' and s[0] == 'x':
        if A[1] == A[N-1]:
            #---------------------------------------------↓
            if A[N-1] == 'S' and s[N-1] == 'o':
                if A[0] == A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'S' and s[N-1] == 'x':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'o':
                if A[0] != A[N-2]:
                    flag2 = 1
            elif A[N-1] == 'W' and s[N-1] == 'x':
                if A[0] == A[N-2]:
                    flag2 = 1
            #---------------------------------------------↑

    if flag2 == 1:
        return 1
    else:
        return 0

A = 'SS'
for i in range(1,N-1):
    if s[i] == 'o' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
    elif s[i] == 'o' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
if majikayo() == 1:
    print(A)
else:
    A = 'SW'
    for i in range(1,N-1):
        if s[i] == 'o' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
        elif s[i] == 'o' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
    if majikayo() == 1:
        print(A)
    else:
        k = 0
        A = 'WS'
        for i in range(1,N-1):
            if s[i] == 'o' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
            elif s[i] == 'o' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
        majikayo()
        if majikayo() == 1:
            print(A)
        else:
            k = 0
            A = 'WW'
            for i in range(1,N-1):
                if s[i] == 'o' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
                elif s[i] == 'o' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
            if majikayo() == 1:
                print(A)
            else:
                print((-1))


def main():
    # import sys
    # readline = sys.stdin.buffer.readline
    # readlines = sys.stdin.buffer.readlines
    N = int(input())
    L = input()

    A = [None] * (N + 1)
    for a0, a1 in [(0, 0), (0, 1), (1, 0), (1, 1)]:
        A[0] = a0
        A[1] = a1
        for i in range(2, N + 1):
            a = A[i - 1]
            s = 0 if L[i - 1] == 'o' else 1
            # if a == 0:
            #     if s == 0:
            #         A[i] = A[i - 2]
            #     elif s == 1:
            #         A[i] = A[i - 2] ^ 1
            # elif a == 1:
            #     if s == 0:
            #         A[i] = A[i - 2] ^ 1
            #     elif s == 1:
            #         A[i] = A[i - 2]
            A[i] = A[i - 2] ^ (a ^ s)
        am = A[1] ^ (A[0] ^ (L[0] == 'x'))
        if A[0] == A[N] and am == A[N - 1]:
            exists = True
            break
    else:
        exists = False

    if exists:
        ans = []
        for i in range(N):
            c = 'W' if A[i] else 'S'
            ans.append(c)
        print((''.join(ans)))
    else:
        print((-1))


def __starting_point():
    main()

__starting_point()

N=int(input())
s=input()
ans1="SS"
ans2="WS"
ans3="WW"
ans4="SW"
ans=[ans1,ans2,ans3,ans4]
c=0
for j in range(4):        
    for k in range(1,N-1):
        if s[k]=="o":
            if ans[j][k]=="S":
                ans[j]+=ans[j][-2]
            else:
                if ans[j][-2]=="W":
                    ans[j]+="S"
                else:
                    ans[j]+="W"
        if s[k]=="x":
            if ans[j][k]=="W":
                ans[j]+=ans[j][-2]
            else:
                if ans[j][-2]=="W":
                    ans[j]+="S"
                else:
                    ans[j]+="W"
    if s[0]=="o":
        if ans[j][0]=="S":
            if ans[j][-1]==ans[j][1]:
                if ans[j][-1]=="S":
                    if s[-1]=="o":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                if ans[j][-1]=="W":
                    if s[-1]=="o":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    
        if ans[j][0]=="W":
            if ans[j][-1]!=ans[j][1]:
                if ans[j][-1]=="S":
                    if s[-1]=="o":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                if ans[j][-1]=="W":
                    if s[-1]=="o":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
    if s[0]=="x":
        if ans[j][0]=="W":
            if ans[j][-1]==ans[j][1]:
                if ans[j][-1]=="S":
                    if s[-1]=="o":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                if ans[j][-1]=="W":
                    if s[-1]=="o":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
        if ans[j][0]=="S":
            if ans[j][-1]!=ans[j][1]:
                if ans[j][-1]=="S":
                    if s[-1]=="o":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                if ans[j][-1]=="W":
                    if s[-1]=="o":
                        if ans[j][-2]!=ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
                    if s[-1]=="x":
                        if ans[j][-2]==ans[j][0]:
                            print(ans[j])
                            c+=1
                            break
if c==0:
    print(-1)

N = int(input())
S = input()

ans = [''] * N

def other(s):
  if s == 'S':
    return 'W'
  else:
    return 'S'

def calc(S):
  nonlocal ans
  for i, s in enumerate(S):
    if s == 'o':
      if ans[i] == 'S':
        ans[(i+1)%N] = ans[i-1]
      else:
        ans[(i+1)%N] = other(ans[i-1])
    else:
      if ans[i] == 'S':
        ans[(i+1)%N] = other(ans[i-1])
      else:
        ans[(i+1)%N] = ans[i-1]

ans[-1] = 'S'
ans[0] = 'S'
calc(S)
if (ans[0], ans[-1]) == ('S', 'S'):
  print(''.join(ans))
  return

ans[-1] = 'S'
ans[0] = 'W'
calc(S)
if (ans[0], ans[-1]) == ('W', 'S'):
  print(''.join(ans))
  return

ans[-1] = 'W'
ans[0] = 'S'
calc(S)
if (ans[0], ans[-1]) == ('S', 'W'):
  print(''.join(ans))
  return

ans[-1] = 'W'
ans[0] = 'W'
calc(S)
if (ans[0], ans[-1]) == ('W', 'W'):
  print(''.join(ans))
  return

print(-1)

n = int(input())
s = input()

# assume [0 is S, -1 is S]

for ans0, ans_last in [ ('S','S'),('S','W'),('W','S'),('W','W') ]:
    ans = ['tbd']*n
    ans[0] = ans0
    ans[-1] = ans_last
        
    for i in range(n-2):
        if (s[i] == 'o' and ans[i] == 'S') or (s[i] == 'x' and ans[i] == 'W'):
            ans[i+1] = ans[i-1]
        else:
            ans[i+1] = 'S' if ans[i-1] == 'W' else 'W'

    last_two_flag = False
    last_one_flag = False

    if (s[n-2] == 'o' and ans[n-2] == 'S') or (s[n-2] == 'x' and ans[n-2] == 'W'):
        if ans[n-3] == ans[n-1]:
            last_two_flag = True
    else:
        if ans[n-3] != ans[n-1]:
            last_two_flag = True


    if (s[n-1] == 'o' and ans[n-1] == 'S') or (s[n-1] == 'x' and ans[n-1] == 'W'):
        if ans[n-2] == ans[0]:
            last_one_flag = True
    else:
        if ans[n-2] != ans[0]:
            last_one_flag = True

    if last_one_flag and last_two_flag:
        print(''.join(ans))
        return

print(-1)

N=int(input())
S=input()
for t in ["SS", "SW", "WS", "WW"]:
  for i in S[1:-1]:
    if t[-1] == "S":
      if i == "o": t+=t[-2]
      else: t += "S" if t[-2] == "W" else "W"
    else:
      if i == "x": t += t[-2]
      else: t += "S" if t[-2] == "W" else "W"

    if t[0] == "S":
      if S[0] == "o": f = t[-1] == t[1]
      else: f = t[-1] != t[1]
    else:
      if S[0] == "x": f = t[-1] == t[1]
      else: f = t[-1] != t[1]
 
    if t[-1] == "S":
      if S[-1] == "o": g = t[-2] == t[0]
      else: g = t[-2] != t[0]
    else:
      if S[-1] == "x": g = t[-2] == t[0]
      else: g = t[-2] != t[0]
 
  if f and g:
    print(t)
    return

print(-1)

def main():
    N = int(input())
    S = input()
    M = [{'o': 0, 'x': 1}, {'o': 1, 'x': 0}]
    for s1, sn in [(0, 0), (0, 1), (1, 0), (1, 1)]:
        T = [s1]
        p, pp = s1, sn
        for s in S:
            pp, p = p, M[p ^ pp][s]
            T.append(p)
        if (s1, sn) == (p, pp):
            return T[:-1]
    return None

T = main()
if not T:
    print((-1))
else:
    print((''.join('S' if s == 0 else 'W' for s in T)))


N = int(input())

s = input()
t = [["X"] * N for _ in range(4)]

if s[1] == "o":
    t[0][0], t[0][1], t[0][2] = "S", "S", "S"
    t[1][0], t[1][1], t[1][2] = "W", "S", "W"
    t[2][0], t[2][1], t[2][2] = "S", "W", "W"
    t[3][0], t[3][1], t[3][2] = "W", "W", "S"
else:
    t[0][0], t[0][1], t[0][2] = "S", "S", "W"
    t[1][0], t[1][1], t[1][2] = "W", "S", "S"
    t[2][0], t[2][1], t[2][2] = "S", "W", "S"
    t[3][0], t[3][1], t[3][2] = "W", "W", "W"

for i in range(4):
    for j in range(3, N):
        if (s[j - 1] == "o" and t[i][j - 1] == "S") or (s[j - 1] == "x" and t[i][j - 1] == "W"):
            t[i][j] = t[i][j - 2]
        else:
            if t[i][j - 2] == "S":
                t[i][j] = "W"
            else:
                t[i][j] = "S"
    flag = True
    if (s[0] == "o" and t[i][0] == "S") or (s[0] == "x" and t[i][0] == "W"):
        if t[i][-1] != t[i][1]:
            flag = False
    else:
        if t[i][-1] == t[i][1]:
            flag = False
    if (s[-1] == "o" and t[i][-1] == "S") or (s[-1] == "x" and t[i][-1] == "W"):
        if t[i][-2] != t[i][0]:
            flag = False
    else:
        if t[i][-2] == t[i][0]:
            flag = False
    if flag:
        print(*t[i], sep = "")
        return

print(-1)


rev_ox = {"o":"x", "x":"o"}
rev_sw = {"S":"W", "W":"S"}

def get_next(sw_prev2,sw_prev1,ox_prev1):
        
    sw = sw_prev2
    if sw_prev1 == "W": ox_prev1 = rev_ox[ox_prev1]
    if ox_prev1 == "x": sw = rev_sw[sw]
    
    return sw

n = int(input())
ox = input()

for sw0,sw1 in [("S","S"),("S","W"),("W","S"),("W","W")]:
    ans = ""
    ans = sw0+sw1
    for i,oxi in enumerate(ox[1:]+ox[0],1):
        ans += get_next(ans[i-1],ans[i],oxi)
    
    if ans[0] == ans[-2] and ans[1] == ans[-1]:
        ans = ans[:-2]
        break
else:
    ans = -1

print(ans)

N = int(input())
s = input()

# 1番目を決めると全て決まる→これは間違った性質
# 正しくはある連続した2匹の動物の種類がわかれば、その隣にいる動物の種類もわかるということ

pattern = [['S', 'S'], ['S', 'W'], ['W', 'S'], ['W', 'W']]

L = []
for i in range(4):
    ans = ''
    for j in range(N):
        if j == 0:
            ans += pattern[i][j]
            continue
        if j == 1:
            ans += pattern[i][j]
            continue

        if s[j -
             2] == 'o' and s[j -
                             1] == 'o' and ans[j -
                                               1] == 'S' and ans[j -
                                                                 2] == 'S':
            ans += 'S'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'S':
            ans += 'S'
        elif s[j -
               2] == 'o' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'S':
            ans += 'W'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'S':
            ans += 'W'

        elif s[j -
               2] == 'o' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'W':
            ans += 'W'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'W':
            ans += 'W'
        elif s[j -
               2] == 'o' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'W':
            ans += 'S'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'S' and ans[j -
                                                                   2] == 'W':
            ans += 'S'

        elif s[j -
               2] == 'o' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'S':
            ans += 'W'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'S':
            ans += 'W'
        elif s[j -
               2] == 'o' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'S':
            ans += 'S'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'S':
            ans += 'S'

        elif s[j -
               2] == 'o' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'W':
            ans += 'S'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'o' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'W':
            ans += 'S'
        elif s[j -
               2] == 'o' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'W':
            ans += 'W'
        elif s[j -
               2] == 'x' and s[j -
                               1] == 'x' and ans[j -
                                                 1] == 'W' and ans[j -
                                                                   2] == 'W':
            ans += 'W'

    if ans[-1] == 'S' and s[-1] == 'o' and ans[0] != ans[-2]:
        continue
    if ans[-1] == 'S' and s[-1] == 'x' and ans[0] == ans[-2]:
        continue
    if ans[-1] == 'W' and s[-1] == 'o' and ans[0] == ans[-2]:
        continue
    if ans[-1] == 'W' and s[-1] == 'x' and ans[0] != ans[-2]:
        continue

    if ans[0] == 'S' and s[0] == 'o' and ans[-1] != ans[1]:
        continue
    if ans[0] == 'S' and s[0] == 'x' and ans[-1] == ans[1]:
        continue
    if ans[0] == 'W' and s[0] == 'o' and ans[-1] == ans[1]:
        continue
    if ans[0] == 'W' and s[0] == 'x' and ans[-1] != ans[1]:
        continue

    L.append(ans)

if len(L) != 0:
    print((L[0]))
else:
    print((-1))


def main():
    N = int(input())
    s = input()
    #0 sheep 1 wolf
    for i in [[0,0],[0,1],[1,0],[1,1]]:
        t = i[:]
        for j in s[1:]:
            if t[-1] == 0:
                if j == 'o':
                    t.append(t[-2])
                else:
                    t.append(1-t[-2])
            elif j == 'o':
                t.append(1-t[-2])
            else:
                t.append(t[-2])
        if t[-1] == t[0]:
            if s[0] == 'o' and t[0] == 0 and t[1] != t[-2]:
                continue
            if s[0] == 'o' and t[0] == 1 and t[1] == t[-2]:
                continue
            if s[0] == 'x' and t[0] == 0 and t[1] == t[-2]:
                continue
            if s[0] == 'x' and t[0] == 1 and t[1] != t[-2]:
                continue
            print((''.join(['S' if i == 0 else 'W' for i in t[:-1]])))
            return
    print((-1))
    return
main()


n = int(input())
s = list(input())
for i in range(4):
# 1,2 = 羊,羊 の場合
    ans = ['?'] * n
    flg = True
    if i == 0:
        ans[0] = 'S'
        ans[1] = 'S'
        if s[0] == 'o':
            ans[-1] = 'S'
        else:
            ans[-1] = 'W'
        if s[1] == 'o':
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
        else:
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
# 1,2 = 羊,狼 の場合
    if i == 1:
        ans[0] = 'S'
        ans[1] = 'W'
        if s[0] == 'o':
            ans[-1] = 'W'
        else:
            ans[-1] = 'S'
        if s[1] == 'o':
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
        else:
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
# 1,2 = 狼,羊 の場合
    if i == 2:
        ans[0] = 'W'
        ans[1] = 'S'
        if s[0] == 'o':
            ans[-1] = 'W'
        else:
            ans[-1] = 'S'
        if s[1] == 'o':
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
        else:
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
# 1,2 = 狼,狼 の場合
    if i == 3:
        ans[0] = 'W'
        ans[1] = 'W'
        if s[0] == 'o':
            ans[-1] = 'S'
        else:
            ans[-1] = 'W'
        if s[1] == 'o':
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
        else:
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
    if flg:
        for i in range(2,n-1):
            if ans[i] == 'S':
                if s[i] == 'o':
                    if ans[i-1] == 'S':
                        if ans[i+1] == 'W':
                            flg = False
                        else:
                            ans[i+1] = 'S'
                    else:
                        if ans[i+1] == 'S':
                            flg = False
                        else:
                            ans[i+1] = 'W'
                else:
                    if ans[i-1] == 'S':
                        if ans[i+1] == 'S':
                            flg = False
                        else:
                            ans[i+1] = 'W'
                    else:
                        if ans[i+1] == 'W':
                            flg = False
                        else:
                            ans[i+1] = 'S'
            else:
                if s[i] == 'o':
                    if ans[i-1] == 'S':
                        if ans[i+1] == 'S':
                            flg = False
                        else:
                            ans[i+1] = 'W'
                    else:
                        if ans[i+1] == 'W':
                            flg = False
                        else:
                            ans[i+1] = 'S'
                else:
                    if ans[i-1] == 'S':
                        if ans[i+1] == 'W':
                            flg = False
                        else:
                            ans[i+1] = 'S'
                    else:
                        if ans[i+1] == 'S':
                            flg = False
                        else:
                            ans[i+1] = 'W'
        if ans[-1] == 'S':
            if s[-1] == 'o':
                if ans[-2] != ans[0]:
                    flg = False
            else:
                if ans[-2] == ans[0]:
                    flg = False
        else:
            if s[-1] == 'o':
                if ans[-2] == ans[0]:
                    flg = False
            else:
                if ans[-2] != ans[0]:
                    flg = False
    if flg:
        print(''.join(ans))
        return
print(-1)

def solve(n, S):
    for i in range(4):
        ans = list()
        t = i
        for j, s in enumerate(S):
            f0 = t // 2
            f1 = t % 2
            f2 = f0 ^ (0 if s == 'o' else 1)
            ans.append('S' if f2 == 0 else 'W')
            t = ((f1 ^ f2) << 1) | f2

        if (i == t) :
            x = ans[:-1]
            x.insert(0, ans[-1])
            return "".join(x)
    return "-1"

def __starting_point():
    print((solve(int(input()), input())))

__starting_point()

n = int(input())
s = input()
from itertools import product

for v in product([1,0], repeat=2):
    v = list(v)
    for i in range(n-2):
        if v[i+1]:
            if s[i+1] == 'o':
                v.append(v[i])
            else:
                v.append(int(not v[i]))
        else:
            if s[i+1] == 'o':
                v.append(int(not v[i]))
            else:
                v.append(v[i])
    ans = [0,0]
    for i in range(-1,1):
        if v[i]:
            if s[i] == 'o':
                if v[i-1] == v[i+1]:
                    ans[i+1] = 1
                else:
                    ans[i+1] = 0
            else:
                if v[i-1] != v[i+1]:
                    ans[i+1] = 1
                else:
                    ans[i+1] = 0
        else:
            if s[i] == 'o':
                if v[i-1] == v[i+1]:
                    ans[i+1] = 0
                else:
                    ans[i+1] = 1
            else:
                if v[i-1] != v[i+1]:
                    ans[i+1] = 0
                else:
                    ans[i+1] = 1
    if ans[0] and ans[1]:
        for i in range(n):
            if v[i]:
                v[i] = 'S'
            else:
                v[i] = 'W'
        print((''.join(v)))
        return
print((-1))




from itertools import product

N = int(input())
s = input()

swap = {'S': 'W', 'W': 'S'}
for a, b in product('SW', repeat=2):
    t = [None] * N
    t[0] = a
    t[1] = b
    for i in range(1, N - 1):
        if t[i] == 'S':
            if s[i] == 'o':
                t[i + 1] = t[i - 1]
            elif s[i] == 'x':
                t[i + 1] = swap[t[i - 1]]
        elif t[i] == 'W':
            if s[i] == 'o':
                t[i + 1] = swap[t[i - 1]]
            elif s[i] == 'x':
                t[i + 1] = t[i - 1]
    if t[N - 1] == 'S':
        if s[N - 1] == 'o' and t[N - 2] != t[0]:
            continue
        elif s[N - 1] == 'x' and t[N - 2] == t[0]:
            continue
    elif t[N - 1] == 'W':
        if s[N - 1] == 'o' and t[N - 2] == t[0]:
            continue
        elif s[N - 1] == 'x' and t[N - 2] != t[0]:
            continue
    if t[0] == 'S':
        if s[0] == 'o' and t[N - 1] != t[1]:
            continue
        elif s[0] == 'x' and t[N - 1] == t[1]:
            continue
    elif t[0] == 'W':
        if s[0] == 'o' and t[N - 1] == t[1]:
            continue
        elif s[0] == 'x' and t[N - 1] != t[1]:
            continue
    print((''.join(t)))
    return
print((-1))


N = int(input())
s = list(input())
s = s * 2
q = [[True,True],[True,False],[False,True],[False,False]]
p = []
ans = []
for k in range(4):
    p = q[k]
    for i in range(N*2-2):
        if p[i + 1]:
            if s[i + 1] == "o":
                p.append(p[i])
            else:
                p.append(not p[i])
        else:
            if s[i + 1] == "o":
                p.append(not p[i])
            else:
                p.append(p[i])
    if p[0:N-1] == p[N:N*2-1]:
        for i in range(N):
            if p[i]:
                ans.append("S")
            else:
                ans.append("W")
        print("".join(ans))
        break
    if k == 3:
        print(-1)

def add_ans(i,ans,circle):
    if circle[i] == 'o':
        if ans[i] == 'S':
            ans += ans[i-1]

        else:
            if ans[i-1] == 'S':
                ans += 'W'
            else:
                ans += 'S'
            
        
        
    if circle[i] == 'x':
        if ans[i] == 'W':
            ans += ans[i-1]
        
        else:
            if ans[i-1] == 'S':
                ans += 'W'
            else:
                ans += 'S'
            
    return ans
def check_last(ans,circle):
    if circle[0] == 'o':
        if ans[0] == 'S':
            last  = ans[1]

        else:
            if ans[1] == 'S':
                last = 'W'
            else:
                last = 'S'



    if circle[0] == 'x':
        if ans[0] == 'W':
            last = ans[1]

        else:
            if ans[1] == 'S':
                last = 'W'
            else:
                last = 'S'
                
                
    if circle[-1] == 'o':
        if ans[-1] == 'S':
            first  = ans[-2]

        else:
            if ans[-2] == 'S':
                first = 'W'
            else:
                first = 'S'



    if circle[-1] == 'x':
        if ans[-1] == 'W':
            first = ans[-2]

        else:
            if ans[-2] == 'S':
                first = 'W'
            else:
                first = 'S'
                
                
    if (last == ans[-1]) & (first == ans[0]):
        return 1
    else :
        return 0


flag = True
n = int(input())
circle = input()

ans_list = ['SS' , 'SW' , 'WS' , 'WW']
for ans in ans_list:
    for i in range(1,len(circle)-1):
        ans = add_ans(i,ans,circle)


    if check_last(ans , circle) == 1:
        print(ans)
        flag = False
        break

if flag:
    print('-1')

N = int(input())
S = input()

assignable = False

for k in range(4):
    res = [None for _ in range(N)]
    res[0] = k % 2
    res[-1] = k // 2
    for i in range(N - 2):
        if S[i] == 'o':
            if res[i] == 0:
                res[i + 1] = res[i - 1]
            else:
                res[i + 1] = 1 - res[i - 1]
        else:
            if res[i] == 0:
                res[i + 1] = 1 - res[i - 1]
            else:
                res[i + 1] = res[i - 1]
    if S[-2] == 'o':
        if res[-2] == 0:
            if res[-1] != res[-3]:
                continue
        else:
            if res[-1] != 1 - res[-3]:
                continue
    else:
        if res[-2] == 0:
            if res[-1] != 1 - res[-3]:
                continue
        else:
            if res[-1] != res[-3]:
                continue
    if S[-1] == 'o':
        if res[-1] == 0:
            if res[0] == res[-2]:
                assignable = True
        else:
            if res[0] == 1 - res[-2]:
                assignable = True
    else:
        if res[-1] == 0:
            if res[0] == 1 - res[-2]:
                assignable = True
        else:
            if res[0] == res[-2]:
                assignable = True
    if assignable:
        for i in range(N):
            if res[i]:
                print('W', end='')
            else:
                print('S', end='')
        break
else:
    print(-1)

import sys
N = int(input())
s = input()
List = [['S','S'], ['S','W'], ['W','S'], ['W','W']]
for i in range(4):
    ans = List[i]
    for i in range(1,N):
        if i != N-1:
            if (ans[i-1] == ans[i] and s[i] == 'o') or (ans[i-1] != ans[i] and s[i] == 'x'):
                ans.append('S')
            else:
                ans.append('W')
        else:
            if ((((ans[N-1] == 'S' and s[N-1] == 'o') or (ans[N-1] == 'W' and s[N-1] == 'x')) and (ans[N-2] == ans[0])) or (((ans[N-1] == 'S' and s[N-1] == 'x') or (ans[N-1] == 'W' and s[N-1] == 'o')) and (ans[N-2] != ans[0]))) and ((((ans[0] == 'S' and s[0] == 'o') or (ans[0] == 'W' and s[0] == 'x')) and (ans[N-1] == ans[1])) or (((ans[0] == 'S' and s[0] == 'x') or (ans[0] == 'W' and s[0] == 'o')) and (ans[N-1] != ans[1]))):
                print(''.join(ans))
                return
print(-1)

N = int(input())
s = str(input())
A = ''

def majikayo():
    k = 0
    if A[0] == 'S' and s[0] == 'o':
        if A[1] == A[-1]:
            if A[-1] == 'S' and s[-1] == 'o':
                if A[0] == A[-2]:
                    k = 1
            elif A[-1] == 'S' and s[-1] == 'x':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'o':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'x':
                if A[0] == A[-2]:
                    k = 1
    elif A[0] == 'S' and s[0] == 'x':
        if A[1] != A[-1]:
            if A[-1] == 'S' and s[-1] == 'o':
                if A[0] == A[-2]:
                    k = 1
            elif A[-1] == 'S' and s[-1] == 'x':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'o':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'x':
                if A[0] == A[-2]:
                    k = 1
    elif A[0] == 'W' and s[0] == 'o':
        if A[1] != A[-1]:
            if A[-1] == 'S' and s[-1] == 'o':
                if A[0] == A[-2]:
                    k = 1
            elif A[-1] == 'S' and s[-1] == 'x':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'o':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'x':
                if A[0] == A[-2]:
                    k = 1
    elif A[0] == 'W' and s[0] == 'x':
        if A[1] == A[-1]:
            if A[-1] == 'S' and s[-1] == 'o':
                if A[0] == A[-2]:
                    k = 1
            elif A[-1] == 'S' and s[-1] == 'x':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'o':
                if A[0] != A[-2]:
                    k = 1
            elif A[-1] == 'W' and s[-1] == 'x':
                if A[0] == A[-2]:
                    k = 1
    if k == 1:
        return 1

A = 'SS'
for i in range(1,N-1):
    if s[i] == 'o' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
    elif s[i] == 'o' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'S':
        if A[i-1] == 'S':
            A += 'W'
        else:
            A += 'S'
    elif s[i] == 'x' and A[i] == 'W':
        if A[i-1] == 'S':
            A += 'S'
        else:
            A += 'W'
if majikayo() == 1:
    print(A)
else:
    A = 'SW'
    for i in range(1,N-1):
        if s[i] == 'o' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
        elif s[i] == 'o' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'S':
            if A[i-1] == 'S':
                A += 'W'
            else:
                A += 'S'
        elif s[i] == 'x' and A[i] == 'W':
            if A[i-1] == 'S':
                A += 'S'
            else:
                A += 'W'
    if majikayo() == 1:
        print(A)
    else:
        A = 'WS'
        for i in range(1,N-1):
            if s[i] == 'o' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
            elif s[i] == 'o' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'S':
                if A[i-1] == 'S':
                    A += 'W'
                else:
                    A += 'S'
            elif s[i] == 'x' and A[i] == 'W':
                if A[i-1] == 'S':
                    A += 'S'
                else:
                    A += 'W'
        if majikayo() == 1:
            print(A)
        else:
            A = 'WW'
            for i in range(1,N-1):
                if s[i] == 'o' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
                elif s[i] == 'o' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'S':
                    if A[i-1] == 'S':
                        A += 'W'
                    else:
                        A += 'S'
                elif s[i] == 'x' and A[i] == 'W':
                    if A[i-1] == 'S':
                        A += 'S'
                    else:
                        A += 'W'
            if majikayo() == 1:
                print(A)
            else:
                print((-1))



N = int(input())
S = input()

ans = [''] * N

def other(s):
  if s == 'S':
    return 'W'
  else:
    return 'S'

def calc(S):
  nonlocal ans
  for i, s in enumerate(S[1:], 1):
    if s == 'o':
      if ans[i] == 'S':
        ans[(i+1)%N] = ans[i-1]
      else:
        ans[(i+1)%N] = other(ans[i-1])
    else:
      if ans[i] == 'S':
        ans[(i+1)%N] = other(ans[i-1])
      else:
        ans[(i+1)%N] = ans[i-1]

if S[0] == 'o':
  ans[0] = 'S'
  ans[1] = 'S'
  calc(S)
  if (ans[0], ans[-1]) == ('S', 'S'):
    print(''.join(ans))
    return
  ans[0] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('W', 'W'):
    print(''.join(ans))
    return
  ans[0] = 'S'
  ans[1] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('S', 'W'):
    print(''.join(ans))
    return
  ans[0] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('W', 'S'):
    print(''.join(ans))
    return
else:
  ans[0] = 'S'
  ans[1] = 'S'
  calc(S)
  if (ans[0], ans[-1]) == ('S', 'W'):
    print(''.join(ans))
    return
  ans[0] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('W', 'S'):
    print(''.join(ans))
    return
  ans[0] = 'S'
  ans[1] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('S', 'S'):
    print(''.join(ans))
    return
  ans[0] = 'W'
  calc(S)
  if (ans[0], ans[-1]) == ('W', 'W'):
    print(''.join(ans))
    return

print(-1)

n = int(input())
s = input()
seed1 = ["S","W"]
ans = ["SS","SW","WS","WW"]
for i in s[1:]:
    for k,v in enumerate(ans):
        now = 0 if i == "o" else 1
        now = (now + seed1.index(v[-1]) + seed1.index(v[-2])) % 2
        if now:
            ans[k] += "W"
        else:
            ans[k] += "S"
now = 0 if s[0] == "x" else 1
for i in ans:  
    now2 = (now + seed1.index(i[-2]) + seed1.index(i[1]) + seed1.index(i[0])) % 2
    if (i[0] == i[-1]) and now2:
        print(i[:-1])
        return
print(-1)

n = int(input())
s = input()
s += s[0]
lst = ["SS","SW","WS","WW"]
for x in lst:
    ans = x
    for i in range(1,n+1):
        if (s[i] == "o" and ans[i] == "S") or (s[i] == "x" and ans[i] == "W"):
            if ans[i-1] == "S": ans += "S"
            else: ans += "W"
        else:
            if ans[i-1] == "S": ans += "W"
            else: ans += "S"
    if ans[-2:] == x:
        print(ans[:n])
        return
print(-1)

N = int(input())
S = input()


for s in ['SS', 'SW', 'WS', 'WW']:
    ss = s
    jdg = False
    for i in range(1, N):
        if S[i] == 'o':
            if ss[i] == 'S':
                ss += ss[i - 1]
            else:
                if ss[i - 1] == 'W': ss += 'S'
                else: ss += 'W'
        else:
            if ss[i] == 'S':
                if ss[i - 1] == 'W': ss += 'S'
                else: ss += 'W'
            else:
                ss += ss[i - 1]
    if ss[N] == ss[0]:
        if S[0] == 'o':
            if (ss[0] == 'S' and ss[N-1] == ss[1]) or (ss[0] == 'W' and ss[N-1] != ss[1]):
                jdg = True
                break
        else:
            if (ss[0] == 'S' and ss[N-1] != ss[1]) or (ss[0] == 'W' and ss[N-1] == ss[1]):
                jdg = True
                break
print((ss[:-1] if jdg else -1))


N = int(input())
S = input()
from collections import deque
T = [deque([0, 0]),
     deque([0, 1]),
     deque([1, 0]),
     deque([1, 1])]
for s in S:
    for t in T:
        l = len(t)
        if (s == 'o') ^ t[l-1]:
            t.append(t[l-2])
        else:
            t.append(t[l-2]^1)

ans = '-1'
wrap = lambda x:'{' + str(x) + '}'
for t in T:
    if t[0] == t[N] and t[1] == t[N+1]:
        t.pop(); t.popleft()
        ans = ''.join(wrap(i) for i in t).format('S','W')
        break
print(ans)


N = int(input())
s = input()
inv = {'S':'W','W':'S'}

prefix = ['SS','SW','WS','WW']

def check_i(i): # check0,check-1だけすれば十分
    if s[i] == 'o' and ans[i] == 'S':
        if ans[i+1] != ans[i-1]:
            return False
    if s[i] == 'x' and ans[i] == 'S':
        if ans[i+1] == ans[i-1]:
            return False
    if s[i] == 'o' and ans[i] == 'W':
        if ans[i+1] == ans[i-1]:
            return False
    if s[i] == 'x' and ans[i] == 'W':
        if ans[i+1] != ans[i-1]:
            return False
    return True


for p in prefix:
    ans = p
    for i in range(1,N-1):
        if s[i] == 'o' and ans[i] == 'S':
            ans += ans[i-1]
        if s[i] == 'x' and ans[i] == 'S':
            ans += inv[ans[i-1]]
        if s[i] == 'o' and ans[i] == 'W':
            ans += inv[ans[i-1]]
        if s[i] == 'x' and ans[i] == 'W':
            ans += ans[i-1]
    if check_i(0) and check_i(-1):
        print(ans)
        return
print((-1))




N=int(input())
S=input()
    
for i in range(4):
  ans=[0]*N
  if i==0:
    ans[-1]="S"
    ans[0]="S"
  elif i==1:
    ans[-1]="S"
    ans[0]="W"
  elif i==2:
    ans[-1]="W"
    ans[0]="S"
  else:
    ans[-1]="W"
    ans[0]="W"
  
  for j,s in enumerate(S):
    if j!=N-1 and j!=N-2:
      if ans[j]=="S":
        if s=="o":
          ans[j+1]=ans[j-1]
        else:
          if ans[j-1]=="S":
            ans[j+1]="W"
          else:
            ans[j+1]="S"
      else:
        if s=="x":
          ans[j+1]=ans[j-1]
        else:
          if ans[j-1]=="S":
            ans[j+1]="W"
          else:
            ans[j+1]="S"
    elif j==N-2:
      flag=0
      if ans[N-2]=="S":
        if s=="o":
          if ans[N-1]==ans[N-3]:
            flag=1
        else:
          if ans[N-1]!=ans[N-3]:
            flag=1
      else:
        if s=="x":
          if ans[N-1]==ans[N-3]:
            flag=1
        else:
          if ans[N-1]!=ans[N-3]:
            flag=1
    elif flag:  
      if ans[N-1]=="S":
        if s=="o":
          if ans[N-2]==ans[0]:
            print(("".join(ans)));return
        else:
          if ans[N-2]!=ans[0]:
            print(("".join(ans)));return
      else:
        if s=="x":
          if ans[N-2]==ans[0]:
            print(("".join(ans)));return
        else:
          if ans[N-2]!=ans[0]:
            print(("".join(ans)));return
print((-1))
      
    


import itertools
N=int(input())
slist=[x=="o" for x in input()]
#print(slist)

answer_list=[None]*N

ok=False
for p1,p2 in itertools.product([True,False],repeat=2):
  answer_list[0]=p1
  answer_list[1]=p2
  
  for i in range(2,N):
    if answer_list[i-1]==slist[i-1]:
      answer_list[i]=answer_list[i-2]
    else:
      answer_list[i]=not answer_list[i-2]
        
  contra=False
  for i in range(N):
    l=(i-1)%N
    r=(i+1)%N
    if (answer_list[i]==slist[i])^(answer_list[l]==answer_list[r]):
      contra=True
  if not contra:
    ok=True
    break
    
if ok:
  sw_list=[]
  for ans in answer_list:
    if ans:
      sw_list.append("S")
    else:
      sw_list.append("W")
  print("".join(sw_list))
else:
  print(-1)

def convert(s):
    if s == 'S' or s == 'o':
        return 1
    else:
        return -1


n = int(input())
s = input()

cands = [['S', 'S'], ['S', 'W'], ['W', 'S'], ['W', 'W']]

for cand in cands:
    for i in range(1, len(s)-1):
        if cand[-1] == 'S':
            if s[i] == 'o' and cand[-2] == 'S':
                cand.append('S')
            elif s[i] == 'x' and cand[-2] == 'S':
                cand.append('W')
            elif s[i] == 'o' and cand[-2] == 'W':
                cand.append('W')
            else:
                cand.append('S')
        else:
            if s[i] == 'o' and cand[-2] == 'S':
                cand.append('W')
            elif s[i] == 'x' and cand[-2] == 'S':
                cand.append('S')
            elif s[i] == 'o' and cand[-2] == 'W':
                cand.append('S')
            else:
                cand.append('W')
    if (convert(cand[0]) * convert(cand[-1]) * convert(cand[1]) * convert(s[0]) == 1) and \
            (convert(cand[0]) * convert(cand[-1]) * convert(cand[-2]) * convert(s[-1]) == 1):
        print((''.join(cand)))
        return

print((-1))


import itertools
n = int(input())
s = input()
t = [''] * n
for p in itertools.product(['o', 'x'], repeat=2):
  t[-1] = p[0]
  t[0] = p[1]
  for i in range(1, n - 1):
    if (t[i - 2] + t[i - 1] + s[i - 1]).count('x') % 2 == 0:
      t[i] = 'o'
    else:
      t[i] = 'x'
  if (t[-3] + t[-2] + t[-1] + s[-2]).count('x') % 2 == 0 and (t[-2] + t[-1] + t[0] + s[-1]).count('x') % 2 == 0:
    ans = []
    for c in t:
      if c == 'o':
        ans.append('S')
      else:
        ans.append('W')
    print(*ans, sep='')
    break
else:
  print(-1)


n = int(input())
s = list(input())
for i in range(4):
    ans = ['?'] * n
    flg = True
# 1,2 = 羊,羊 の場合
    if i == 0:
        ans[0] = 'S'
        ans[1] = 'S'
        if s[0] == 'o':
            ans[-1] = 'S'
        else:
            ans[-1] = 'W'
        if s[1] == 'o':
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
        else:
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
# 1,2 = 羊,狼 の場合
    if i == 1:
        ans[0] = 'S'
        ans[1] = 'W'
        if s[0] == 'o':
            ans[-1] = 'W'
        else:
            ans[-1] = 'S'
        if s[1] == 'o':
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
        else:
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
# 1,2 = 狼,羊 の場合
    if i == 2:
        ans[0] = 'W'
        ans[1] = 'S'
        if s[0] == 'o':
            ans[-1] = 'W'
        else:
            ans[-1] = 'S'
        if s[1] == 'o':
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
        else:
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
# 1,2 = 狼,狼 の場合
    if i == 3:
        ans[0] = 'W'
        ans[1] = 'W'
        if s[0] == 'o':
            ans[-1] = 'S'
        else:
            ans[-1] = 'W'
        if s[1] == 'o':
            if ans[2] == 'W':
                flg = False
            else:
                ans[2] = 'S'
        else:
            if ans[2] == 'S':
                flg = False
            else:
                ans[2] = 'W'
    for i in range(2,n-2):
        if ans[i] == 'S':
            if s[i] == 'o':
                if ans[i-1] == 'S':
                    ans[i+1] = 'S'
                else:
                    ans[i+1] = 'W'
            else:
                if ans[i-1] == 'S':
                    ans[i+1] = 'W'
                else:
                    ans[i+1] = 'S'
        else:
            if s[i] == 'o':
                if ans[i-1] == 'S':
                    ans[i+1] = 'W'
                else:
                    ans[i+1] = 'S'
            else:
                if ans[i-1] == 'S':
                    ans[i+1] = 'S'
                else:
                    ans[i+1] = 'W'
    if ans[-2] == 'S':
        if s[-2] == 'o':
            if ans[-3] != ans[-1]:
                flg = False
        else:
            if ans[-3] == ans[-1]:
                flg = False
    else:
        if s[-2] == 'o':
            if ans[-3] == ans[-1]:
                flg = False
        else:
            if ans[-3] != ans[-1]:
                flg = False
    if ans[-1] == 'S':
        if s[-1] == 'o':
            if ans[-2] != ans[0]:
                flg = False
        else:
            if ans[-2] == ans[0]:
                flg = False
    else:
        if s[-1] == 'o':
            if ans[-2] == ans[0]:
                flg = False
        else:
            if ans[-2] != ans[0]:
                flg = False
    if flg:
        print(''.join(ans))
        return
print(-1)

import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  N=I()
  s=S()
  a=['S','W']
  aa=(['S','S'],['S','W'],['W','S'],['W','W'])

  for ans in aa:
    for i in range(1,N-1):
      if ans[i]=='S':
        if s[i]=='o':
          ans.append(ans[i-1])
        else:
          ind=a.index(ans[i-1])
          ans.append(a[1-ind])
      else:
        if s[i]=='o':
          ind=a.index(ans[i-1])
          ans.append(a[1-ind])
        else:
          ans.append(ans[i-1])
    stress=''.join(str(x) for x in ans)
    f=True
    for i in range(N):
      if stress[i]=='S':
        if i==0:
          if s[i]=='o':
            if not (stress[-1]==stress[i+1]):
              # return 'aaa1'+' '+stress
              f=False
          else:
            if not (stress[-1]!=stress[i+1]):
              # return 'aaa2'
              f=False
        elif i==N-1:
          if s[i]=='o':
            if not (stress[i-1]==stress[0]):
              # return 'aaa3'
              f=False
          else:
            if not (stress[i-1]!=stress[0]):
              # return 'aaa4'
              f=False
        else:
          if s[i]=='o':
            if not (stress[i-1]==stress[i+1]):
              # return 'aaa5'
              f=False
          else:
            if not (stress[i-1]!=stress[i+1]):
              # return 'aaa6'
              f=False
      else:
        if i==0:
          if s[i]=='o':
            if not (stress[-1]!=stress[i+1]):
              # return 'bbb1'
              f=False
          else:
            if not (stress[-1]==stress[i+1]):
              # return 'bbb2'
              f=False
        elif i==N-1:
          if s[i]=='o':
            if not (stress[i-1]!=stress[0]):
              # return 'bbb3'
              f=False
          else:
            if not (stress[i-1]==stress[0]):
              # return 'bbb4'
              f=False
        else:
          if s[i]=='o':
            if not (stress[i-1]!=stress[i+1]):
              # return 'bbb5'
              f=False
          else:
            if not (stress[i-1]==stress[i+1]):
              # return 'bbb6'
              f=False

    if f:
      return ''.join(str(x) for x in ans)

  return -1

# main()
print((main()))


def next_animal(before, current, claim):
    if (before == current and claim == 'x') or \
        (before != current and claim == 'o'):
        return 'W'
    else:
        return 'S'


def search(S):
    assert len(S) > 2
    init_twos = ['SS', 'SW', 'WS', 'WW']
    ret = ''
    for init_two in init_twos:
        animals = init_two
        for i in range(1, len(S) - 1):
            a = next_animal(animals[i - 1], animals[i], S[i])
            animals += a
        # check: claim of first and last animals
        if animals[1] != next_animal(animals[-1], animals[0], S[0]):
            continue
        if animals[0] != next_animal(animals[-2], animals[-1], S[-1]):
            continue
        ret = animals
        break
    return ret


def main():
    N = int(input())
    S = input()
    ret = search(S)
    if len(ret) > 0:
        print(ret)
    else:
        print((-1))


def __starting_point():
    main()

__starting_point()

import sys
n=int(input())
s=str(input())
l=[0]*n
flag=1

if s[0]=='x':
  flag=0
  new_s=''
  for j in range(n):
    if s[j]=='x':
      new_s+='o'
    else:
      new_s+='x'
  s=new_s
  
def check(i,l):
  sys.setrecursionlimit(10000000)
  if i==0:
    l11=[0]*n
    l12=[0]*n
    l21=[0]*n
    l22=[0]*n
    l11[0]='S'
    l11[1]=l11[n-1]='S'
    l12[0]='S'
    l12[1]=l12[n-1]='W'
    tmp1=check(i+1,l11)
    tmp2=check(i+1,l12)
    l21[0]=l21[n-1]='W'
    l21[1]='S'
    l22[0]=l22[1]='W'
    l22[n-1]='S'
    tmp3=check(i+1,l21)
    tmp4=check(i+1,l22)
    if tmp1==tmp2==tmp3==tmp4==-1:
      return -1
    else:
      if tmp1!=-1:
        return tmp1
      if tmp2!=-1:
        return tmp2
      if tmp3!=-1:
        return tmp3
      if tmp4!=-1:
        return tmp4
  elif 1<=i<=n-2:
    if s[i]=='o':
      if l[i]=='S':
        l[i+1]=l[i-1]
        return check(i+1,l)
      else:
        if l[i-1]=='W':
          l[i+1]='S'
          return check(i+1,l)
        else:
          l[i+1]='W'
          return check(i+1,l)
    else:
      if l[i]=='W':
        l[i+1]=l[i-1]
        return check(i+1,l)
      else:
        if l[i-1]=='S':
          l[i+1]='W'
          return check(i+1,l)
        else:
          l[i+1]='S'
          return check(i+1,l)
  else:
    if s[i]=='o':
      if l[i]=='S':
        if l[i-1]==l[0]:
          if (l[0]=='W' and l[i]==l[1]) or (l[0]=='S' and l[i]!=l[1]):
            return -1
          else:
            return l
        else:
          return -1
      else:
        if l[i-1]!=l[0]:
          if (l[0]=='W' and l[i]==l[1]) or (l[0]=='S' and l[i]!=l[1]):
            return -1
          else:
            return l
        else:
          return -1
    else:
      if l[i]=='S':
        if l[i-1]!=l[0]:
          if (l[0]=='W' and l[i]==l[1]) or (l[0]=='S' and l[i]!=l[1]):
            return -1
          else:
            return l
        else:
          return -1
      else:
        if l[i-1]==l[0]:
          if (l[0]=='W' and l[i]==l[1]) or (l[0]=='S' and l[i]!=l[1]):
            return -1
          else:
            return l
        else:
          return -1      
ans=check(0,l)
if ans==-1:
  print(-1)
else:
  if flag:
    print(''.join(ans))
  else:
    for i in range(n):
      if ans[i]=='S':
        ans[i]='W'
      else:
        ans[i]='S'
    print(''.join(ans))

def add_ans(i,ans,circle):
    if circle[i] == 'o':
        if ans[i] == 'S':
            ans += ans[i-1]

        else:
            if ans[i-1] == 'S':
                ans += 'W'
            else:
                ans += 'S'
            
        
        
    if circle[i] == 'x':
        if ans[i] == 'W':
            ans += ans[i-1]
        
        else:
            if ans[i-1] == 'S':
                ans += 'W'
            else:
                ans += 'S'
            
    return ans
def check_last(ans,circle):
    if circle[0] == 'o':
        if ans[0] == 'S':
            last  = ans[1]

        else:
            if ans[1] == 'S':
                last = 'W'
            else:
                last = 'S'



    elif circle[0] == 'x':
        if ans[0] == 'W':
            last = ans[1]

        else:
            if ans[1] == 'S':
                last = 'W'
            else:
                last = 'S'
                
                
    if circle[-1] == 'o':
        if ans[-1] == 'S':
            first  = ans[-2]

        else:
            if ans[-2] == 'S':
                first = 'W'
            else:
                first = 'S'



    elif circle[-1] == 'x':
        if ans[-1] == 'W':
            first = ans[-2]

        else:
            if ans[-2] == 'S':
                first = 'W'
            else:
                first = 'S'
                
                
    if (last == ans[-1]) & (first == ans[0]):
        return 1
    else :
        return 0


flag = True
n = int(input())
circle = input()

ans_list = ['SS' , 'SW' , 'WS' , 'WW']
for ans in ans_list:
    for i in range(1,len(circle)-1):
        ans = add_ans(i,ans,circle)


    if check_last(ans , circle) == 1:
        print(ans)
        flag = False
        break

if flag:
    print('-1')

n = int(input())
S = input()

P = [
    ['S', 'S'],['S', 'W'],
    ['W', 'S'],['W', 'W']
]

if S[0] == 'o':
    n1 = ['S','W','W','S']
else:
    n1 = ['W','S','S','W']

for idx, p in enumerate(P):
    for i in range(1, n-1):
        if S[i] == 'o':
            if p[i] == 'S':
                p.append(p[i-1])
            else:
                p.append('W' if p[i-1] == 'S' else 'S')
        else:
            if p[i] == 'S':
                p.append('W' if p[i-1] == 'S' else 'S')
            else:
                p.append(p[i-1])
    if n1[idx] == p[-1]:
        if  (S[-1] == 'o' and n1[idx] == 'S' and p[0] == p[-2]) or\
            (S[-1] == 'o' and n1[idx] == 'W' and p[0] != p[-2]) or\
            (S[-1] == 'x' and n1[idx] == 'W' and p[0] == p[-2]) or\
            (S[-1] == 'x' and n1[idx] == 'S' and p[0] != p[-2]):
                print((''.join(p)))
                break
else:
    print((-1))


import sys
n=int(input())
s = list(input())
l = list(0 for i in range(n))
l[0]='S'
l[1]='S'
for i in range(1,n-1):
    if l[i]=='S':
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='S'
            else:
                l[i+1]='W'
        else:
            if s[i]=='o':
                l[i+1]='W'
            else:
                l[i+1]='S'
    else:
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='W'
            else:
                l[i+1]='S'
        else:
            if s[i]=='o':
                l[i+1]='S'
            else:
                l[i+1]='W'
if l[n-1]=='S':
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
    else:
        if s[n-1]=='o':
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
else:
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return   
    else:
        if s[n-1]=='o':
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return   
l[0]='S'
l[1]='W'
for i in range(1,n-1):
    if l[i]=='S':
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='S'
            else:
                l[i+1]='W'
        else:
            if s[i]=='o':
                l[i+1]='W'
            else:
                l[i+1]='S'
    else:
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='W'
            else:
                l[i+1]='S'
        else:
            if s[i]=='o':
                l[i+1]='S'
            else:
                l[i+1]='W'
if l[n-1]=='S':
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
    else:
        if s[n-1]=='o':
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
else:
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return   
    else:
        if s[n-1]=='o':
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return   
l[0]='W'
l[1]='S'
for i in range(1,n-1):
    if l[i]=='S':
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='S'
            else:
                l[i+1]='W'
        else:
            if s[i]=='o':
                l[i+1]='W'
            else:
                l[i+1]='S'
    else:
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='W'
            else:
                l[i+1]='S'
        else:
            if s[i]=='o':
                l[i+1]='S'
            else:
                l[i+1]='W'
if l[n-1]=='S':
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
    else:
        if s[n-1]=='o':
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
else:
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return   
    else:
        if s[n-1]=='o':
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return  
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return   
l[0]='W'
l[1]='W'
for i in range(1,n-1):
    if l[i]=='S':
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='S'
            else:
                l[i+1]='W'
        else:
            if s[i]=='o':
                l[i+1]='W'
            else:
                l[i+1]='S'
    else:
        if l[i-1]=='S':
            if (s[i]=='o'):
                l[i+1]='W'
            else:
                l[i+1]='S'
        else:
            if s[i]=='o':
                l[i+1]='S'
            else:
                l[i+1]='W'
if l[n-1]=='S':
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
    else:
        if s[n-1]=='o':
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
else:
    if l[n-2]=='S':
        if (s[n-1]=='o'):
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
    else:
        if s[n-1]=='o':
            if l[0]=='S':
                if s[0]=='o':
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return    
        else:
            if l[0]=='W':
                if s[0]=='o':
                    if l[n-1]!=l[1]:
                        l=''.join(l)
                        print(l)
                        return
                else:
                    if l[n-1]==l[1]:
                        l=''.join(l)
                        print(l)
                        return    
print((-1))
    

        



import sys
N = int(input())
S = input()

X = [''] * (N + 1)
X[0] = 'S'
X[1] = 'S'
for i in range(1, N):
    if X[i] == 'S':
        if S[i] == 'o':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
    else:
        if S[i] == 'x':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
if X[-1] == 'S':
    if (X[-2] == 'S' and S[0] == 'o') or (X[-2] == 'W' and S[0] == 'x'):
        X.pop()
        for x in X:
            print(x, end='')
        print('')
        return

X = [''] * (N + 1)
X[0] = 'S'
X[1] = 'W'
for i in range(1, N):
    if X[i] == 'S':
        if S[i] == 'o':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
    else:
        if S[i] == 'x':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
if X[-1] == 'S':
    if (X[-2] == 'S' and S[0] == 'x') or (X[-2] == 'W' and S[0] == 'o'):
        X.pop()
        for x in X:
            print(x, end='')
        print('')
        return

X = [''] * (N + 1)
X[0] = 'W'
X[1] = 'S'
for i in range(1, N):
    if X[i] == 'S':
        if S[i] == 'o':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
    else:
        if S[i] == 'x':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
if X[-1] == 'W':
    if (X[-2] == 'S' and S[0] == 'x') or (X[-2] == 'W' and S[0] == 'o'):
        X.pop()
        for x in X:
            print(x, end='')
        print('')
        return

X = [''] * (N + 1)
X[0] = 'W'
X[1] = 'W'
for i in range(1, N):
    if X[i] == 'S':
        if S[i] == 'o':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
    else:
        if S[i] == 'x':
            X[i + 1] = X[i - 1]
        else:
            if X[i - 1] == 'S':
                X[i + 1] = 'W'
            else:
                X[i + 1] = 'S'
if X[-1] == 'W':
    if (X[-2] == 'S' and S[0] == 'o') or (X[-2] == 'W' and S[0] == 'x'):
        X.pop()
        for x in X:
            print(x, end='')
        print('')
        return

print('-1')

n = int(input())
s = input()
s += s[0]+s[1]
case = ["SS","SW","WS","WW"]
for x in case:
    animal = x
    for i in range(1,n+1):
        if (s[i] == "o" and animal[i] == "S") or (s[i] == "x" and animal[i] == "W"):
            if animal[i-1] == "S": 
                animal += "S"
            else: 
                animal += "W"
        elif animal[i-1] == "S": 
                animal += "W"
        else: 
            animal += "S"
    if animal[-2:] == x:
        print(animal[:n])
        return
print(-1)