AtCoder Beginner Contest 055 - Menagerie

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.

Source: atcoder | Difficulty: MEDIUM


Solutions:
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)
			elif l[i - 1] == 'W':
				l[i + 1] = 'S'
				return check(i + 1, l)
			else:
				l[i + 1] = 'W'
				return check(i + 1, l)
		elif l[i] == 'W':
			l[i + 1] = l[i - 1]
			return check(i + 1, l)
		elif l[i - 1] == 'S':
			l[i + 1] = 'W'
			return check(i + 1, l)
		else:
			l[i + 1] = 'S'
			return check(i + 1, l)
	elif 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
		elif 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
	elif 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
	elif 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)
elif flag:
	print(''.join(ans))
else:
	for i in range(n):
		if ans[i] == 'S':
			ans[i] = 'W'
		else:
			ans[i] = 'S'
	print(''.join(ans))


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')
			elif sub[j - 2] == 'S':
				sub.append('W')
			else:
				sub.append('S')
		elif sub[j - 1] == 'S':
			if sub[j - 2] == 'S':
				sub.append('W')
			else:
				sub.append('S')
		elif 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
	elif 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
	elif 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)


n = int(input())
s = input()
s += s[0]
pat = ['WW', 'WS', 'SW', 'SS']
for j in pat:
	now = j
	flag = True
	for i in range(1, n + 1):
		if now[i] == 'S' and s[i] == 'o' or (now[i] == 'W' and s[i] == 'x'):
			now += now[i - 1]
		elif now[i - 1] == 'S':
			now += 'W'
		else:
			now += 'S'
	if now[0] == now[-2] and now[1] == now[-1]:
		print(now[:-2])
		exit()
print(-1)


n = int(input())
s = [1 if si == 'o' else 0 for si in list(input())]
t0 = [[1, 1], [1, 0], [0, 1], [0, 0]]
for ti in t0:
	flag = True
	for i in range(1, n - 1):
		if ti[i] * (1 - s[i]) or (1 - ti[i]) * s[i]:
			ti.append(1 - ti[i - 1])
		else:
			ti.append(ti[i - 1])
	for i in range(2):
		if ti[i - 1]:
			if s[i - 1] and (not ti[i - 2] == ti[i]) or (1 - s[i - 1] and ti[i - 2] == ti[i]):
				flag = False
		elif s[i - 1] and ti[i - 2] == ti[i] or (1 - s[i - 1] and (not ti[i - 2] == ti[i])):
			flag = False
	if flag:
		ans = ['S' if x else 'W' for x in ti]
		print(''.join(ans))
		exit()
print(-1)


import sys
sys.setrecursionlimit(10 ** 6)
readline = sys.stdin.readline
n = int(input())
s = input()

def solve(a, b):
	res = [a, b]
	for i in s:
		if i == 'o':
			c = (res[-1] + res[-2]) % 2
		else:
			c = (1 + res[-1] + res[-2]) % 2
		res.append(c)
	if res[-2] == a and res[-1] == b:
		ans = ['W' if i else 'S' for i in res[1:-1]]
		print(''.join(ans))
		exit()
for a in range(2):
	for b in range(2):
		solve(a, b)
print(-1)


def another(t):
	if t == 'W':
		return 'S'
	else:
		return 'W'

def ok(t1, t2, t3, op):
	if op == 'o' and t2 == 'S' or (op == 'x' and t2 == 'W'):
		return t1 == t3
	else:
		return t1 != t3

def check(ans):
	for i in range(n - 2):
		c = s[i]
		t = ans[i]
		if c == 'o' and t == 'S' or (c == 'x' and t == 'W'):
			ans[i + 1] = ans[i - 1]
		else:
			ans[i + 1] = another(ans[i - 1])
	(t1, t2, t3, t4) = (ans[-3], ans[-2], ans[-1], ans[0])
	return ok(t1, t2, t3, s[-2]) and ok(t2, t3, t4, s[-1])
n = int(input())
s = input()
for (head, tail) in (('S', 'S'), ('S', 'W'), ('W', 'S'), ('W', 'W')):
	ans = [''] * n
	ans[0] = head
	ans[-1] = tail
	if check(ans):
		print(*ans, sep='')
		break
else:
	print(-1)


def main():
	N = int(input())
	s = input()
	for (a0, a1) in ((0, 0), (0, 1), (1, 0), (1, 1)):
		l = [a0, a1]
		for c in s[1:] + s[0]:
			if c == 'o':
				(a0, a1) = (a1, not a0 ^ a1)
			else:
				(a0, a1) = (a1, a0 ^ a1)
			l.append(a1)
		if l[0] == a0 and l[1] == a1:
			print(''.join(('S' if i else 'W' for i in l[:-2])))
			exit()
	print(-1)
main()


n = int(input())
s = input()
s += s[0]
is_ans = False
for ans in ['SS', 'SW', 'WS', 'WW']:
	for i in range(1, n + 1):
		a_0 = ans[i - 1]
		a_1 = ans[i]
		if s[i] == 'o' and a_1 == 'S':
			if a_0 == 'S':
				ans += 'S'
			else:
				ans += 'W'
		elif s[i] == 'x' and a_1 == 'S':
			if a_0 == 'S':
				ans += 'W'
			else:
				ans += 'S'
		elif s[i] == 'o' and a_1 == 'W':
			if a_0 == 'S':
				ans += 'W'
			else:
				ans += 'S'
		elif a_0 == 'S':
			ans += 'S'
		else:
			ans += 'W'
	if ans[-2:] == ans[:2]:
		print(ans[:-2])
		is_ans = True
		break
if not is_ans:
	print(-1)


n = int(input())
s = input()
cir = [''] * n
judge = ''

def convertSW(x):
	if x == 'S':
		return 'W'
	elif x == 'W':
		return 'S'
for i in range(4):
	if i == 0:
		(cir[0], cir[1]) = ('S', 'S')
	elif i == 1:
		(cir[0], cir[1]) = ('S', 'W')
	elif i == 2:
		(cir[0], cir[1]) = ('W', 'W')
	else:
		(cir[0], cir[1]) = ('W', 'S')
	if s[0] == 'o' and cir[0] == 'S' or (s[0] == 'x' and cir[0] == 'W'):
		judge = cir[1]
	else:
		judge = convertSW(cir[1])
	for j in range(2, n):
		if s[j - 1] == 'o' and cir[j - 1] == 'S' or (s[j - 1] == 'x' and cir[j - 1] == 'W'):
			cir[j] = cir[j - 2]
		else:
			cir[j] = convertSW(cir[j - 2])
	if s[-1] == 'o' and cir[-1] == 'S' or (s[-1] == 'x' and cir[-1] == 'W'):
		if cir[0] == cir[-2] and judge == cir[-1]:
			print(''.join(cir))
			exit()
	elif cir[0] == convertSW(cir[-2]) and judge == cir[-1]:
		print(''.join(cir))
		exit()
print(-1)


two = ['SS', 'SW', 'WS', 'WW']
n = int(input())
s = input()
flip = {'S': 'W', 'W': 'S'}
flag = False
for i in two:
	for j in s[1:]:
		if j == 'o':
			if i[-1] == 'S':
				i += i[-2]
			else:
				i += flip[i[-2]]
		elif i[-1] == 'S':
			i += flip[i[-2]]
		else:
			i += i[-2]
	if i[0] == i[-1]:
		if s[0] == 'o':
			if i[0] == 'S' and i[-2] == i[1] or (i[0] == 'W' and i[-2] != i[1]):
				flag = True
		elif i[0] == 'S' and i[-2] != i[1] or (i[0] == 'W' and i[-2] == i[1]):
			flag = True
	if flag:
		print(i[:-1])
		break
if not flag:
	print(-1)


N = int(input())
s = input()
b = [0 if si == 'o' else 1 for si in s]
sw = [0] * N
for i in range(4):
	sw[0] = i & 1
	sw[1] = i >> 1 & 1
	for k in range(2, N):
		sw[k] = b[k - 1] ^ sw[k - 1] ^ sw[k - 2]
	if b[N - 1] != sw[N - 2] ^ sw[N - 1] ^ sw[0]:
		continue
	if b[0] != sw[N - 1] ^ sw[0] ^ sw[1]:
		continue
	ans = ['W' if si else 'S' for si in sw]
	print(''.join(ans))
	quit()
print(-1)


from itertools import product
n = int(input())
s = input()
bl = False
for (ef, el) in product([1, -1], repeat=2):
	zoo = [0] * n
	zoo[0] = ef
	zoo[-1] = el
	for (i, e) in enumerate(s):
		if e == 'o':
			if zoo[i] == 1:
				nxt = zoo[i - 1]
			else:
				nxt = -zoo[i - 1]
		elif zoo[i] == 1:
			nxt = -zoo[i - 1]
		else:
			nxt = zoo[i - 1]
		if i < n - 2:
			zoo[i + 1] = nxt
		elif nxt != zoo[(i + 1) % n]:
			break
	else:
		bl = True
		break
if bl:
	ans = ['S' if e == 1 else 'W' for e in zoo]
	print(*ans, sep='')
else:
	print(-1)


N = int(input())
S = input()
T = [int(s == 'o') for s in S]

def solve():
	for A in [[0, 0], [0, 1], [1, 0], [1, 1]]:
		for i in range(2, N):
			A.append(A[-2] ^ A[-1] ^ T[i - 1])
		if T[-1] == A[-2] ^ A[-1] ^ A[0] and T[0] == A[-1] ^ A[0] ^ A[1]:
			return A
	return []
ans = solve()
if ans:
	print(''.join(('S' if a else 'W' for a in ans)))
else:
	print(-1)


d = {'o': 0, 'x': 1}
e = ['S', 'W']
n = int(input())
s = [d[t] for t in input()]
for i in range(4):
	a = [-1] * (n + 2)
	a[0] = i % 2
	a[1] = i // 2
	for i in range(n):
		a[i + 2] = a[i] ^ a[i + 1] ^ s[i]
	if a[0] == a[n] and a[1] == a[n + 1]:
		print(''.join([e[t] for t in a[1:n + 1]]))
		quit()
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)


from itertools import product

def solve():
	N = int(input())
	S = [0 if i == 'o' else 1 for i in input()]
	for (i, j) in product(range(2), repeat=2):
		pattern = [i, j] + [0] * (N - 2)
		for k in range(2, N):
			pattern[k] = (pattern[k - 1] + pattern[k - 2] + S[k - 1]) % 2
		if S[-1] != (pattern[-2] + pattern[-1] + pattern[0]) % 2:
			continue
		if S[0] != (pattern[-1] + pattern[0] + pattern[1]) % 2:
			continue
		answer = ['S' if pattern[k] == 0 else 'W' for k in range(N)]
		print(''.join(answer))
		return None
	print(-1)
solve()


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])
		elif 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
			elif v[i - 1] == v[i + 1]:
				ans[i + 1] = 0
			else:
				ans[i + 1] = 1
		elif s[i] == 'o':
			if v[i - 1] == v[i + 1]:
				ans[i + 1] = 0
			else:
				ans[i + 1] = 1
		elif 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)


from itertools import product
n = int(input())
s = input()
s_dict = {'o': 1, 'x': -1}
flg = False
for combi in product([-1, 1], repeat=2):
	state = list(combi)
	for (i, _s) in enumerate(s[1:], 1):
		cur = state[i]
		res = s_dict[_s] * cur * state[i - 1]
		state.append(res)
	if state[0] == state[-1] and state[n - 1] == state[0] * state[1] * s_dict[s[0]]:
		flg = True
		break
res = ''.join(['S' if i == 1 else 'W' for i in state])
if flg:
	print(res[:-1])
else:
	print(-1)


n = int(input())
s = list(input())
s.append(s[0])
f = 0
l = ['S', 'S']
for j in range(4):
	for i in range(1, n + 1):
		if l[i] == 'S':
			if l[i - 1] == 'S':
				if s[i] == 'o':
					l.append('S')
				else:
					l.append('W')
			elif s[i] == 'o':
				l.append('W')
			else:
				l.append('S')
		elif l[i - 1] == 'S':
			if s[i] == 'o':
				l.append('W')
			else:
				l.append('S')
		elif s[i] == 'o':
			l.append('S')
		else:
			l.append('W')
	if l[n + 1] == l[1] and l[n] == l[0]:
		f = 1
		break
	elif j == 0:
		l = ['S', 'W']
	elif j == 1:
		l = ['W', 'S']
	elif j == 2:
		l = ['W', 'W']
	else:
		break
if f == 0:
	print(-1)
else:
	l.pop()
	l.pop()
	print(''.join(l))


import sys
from collections import defaultdict
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
S = readline().decode()
st = ['SS', 'SW', 'WS', 'WW']
d = defaultdict(int)
d['SSo'] = 'S'
d['SSx'] = 'W'
d['SWo'] = 'W'
d['SWx'] = 'S'
d['WSo'] = 'W'
d['WSx'] = 'S'
d['WWo'] = 'S'
d['WWx'] = 'W'
ans = []
for s in st:
	t = s
	for i in range(1, N - 1):
		tmp = t[-2:]
		ss = tmp + S[i]
		t += d[ss]
	ans.append(t)
for a in ans:
	b = a[N - 2] + a[N - 1] + S[N - 1]
	if d[b] != a[0]:
		continue
	b = a[N - 1] + a[0] + S[0]
	if d[b] != a[1]:
		continue
	print(a)
	sys.exit()
print(-1)


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]
			elif x[-2] == 'S':
				x += 'W'
			else:
				x += 'S'
		elif 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)


global S, ans

def check_at(i):
	global S, ans
	if ans[i] == 'S':
		if S[i] == 'o' and ans[i - 1] != ans[i + 1] or (S[i] == 'x' and ans[i - 1] == ans[i + 1]):
			return True
	elif S[i] == 'o' and ans[i - 1] == ans[i + 1] or (S[i] == 'x' and ans[i - 1] != ans[i + 1]):
		return True
N = int(input())
S = input()
opposite = {'S': 'W', 'W': 'S'}
for ans in ['SS', 'SW', 'WS', 'WW']:
	for i in range(1, N - 1):
		if ans[i] == 'S' and S[i] == 'o':
			ans += ans[i - 1]
		elif ans[i] == 'S' and S[i] == 'x':
			ans += opposite[ans[i - 1]]
		elif ans[i] == 'W' and S[i] == 'o':
			ans += opposite[ans[i - 1]]
		elif ans[i] == 'W' and S[i] == 'x':
			ans += ans[i - 1]
	if not check_at(-1) and (not check_at(0)):
		print(ans)
		break
else:
	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)


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'
		elif ans[i - 1] == 'S':
			ans += 'W'
		else:
			ans += 'S'
	if ans[-2:] == x:
		print(ans[:n])
		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'
		elif ans[i - 1] == 'S':
			ans += 'W'
		else:
			ans += 'S'
	if ans[-2:] == x:
		print(ans[:n])
		return
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'
		elif 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()


N = int(input())
S = input().replace('o', '0').replace('x', '1')
S = list(map(int, S))
for pattern in [[0, 0], [0, 1], [1, 0], [1, 1]]:
	for s in S[1:]:
		if pattern[-2] ^ pattern[-1] ^ s == 0:
			pattern.append(0)
		else:
			pattern.append(1)
	pattern = pattern[:-1]
	for (i, s) in enumerate(S):
		if pattern[i - 1] ^ pattern[(i + 1) % N] ^ s != pattern[i]:
			break
	else:
		pattern = ''.join(map(str, pattern)).replace('0', 'S').replace('1', 'W')
		print(*pattern, sep='')
		break
else:
	print(-1)


import sys
from collections import deque
dic = {'o': lambda s: 1 - (s[1] ^ s[0]), 'x': lambda s: s[1] ^ s[0]}

def mknseq(ox, ld):
	for x in ld:
		x.append(dic[ox]((x[-2], x[-1])))

def main():
	N = int(sys.stdin.readline().strip())
	s = list(sys.stdin.readline().strip())
	ans = [deque([x, y]) for x in range(2) for y in range(2)]
	for x in range(N):
		mknseq(s[x], ans)
	for x in ans:
		if x[0] == x[-2] and x[1] == x[-1]:
			return print(''.join([['W', 'S'][i] for i in x])[1:-1])
	print(-1)
main()


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)


def add_ans(i, ans, circle):
	if circle[i] == 'o':
		if ans[i] == 'S':
			ans += ans[i - 1]
		elif ans[i - 1] == 'S':
			ans += 'W'
		else:
			ans += 'S'
	if circle[i] == 'x':
		if ans[i] == 'W':
			ans += ans[i - 1]
		elif 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]
		elif ans[1] == 'S':
			last = 'W'
		else:
			last = 'S'
	if circle[0] == 'x':
		if ans[0] == 'W':
			last = ans[1]
		elif ans[1] == 'S':
			last = 'W'
		else:
			last = 'S'
	if circle[-1] == 'o':
		if ans[-1] == 'S':
			first = ans[-2]
		elif ans[-2] == 'S':
			first = 'W'
		else:
			first = 'S'
	if circle[-1] == 'x':
		if ans[-1] == 'W':
			first = ans[-2]
		elif 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()
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)


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()
d = {'S': 'W', 'W': 'S'}

def f(x, y, i, j):
	if y == 'S':
		if s[j] == 'o':
			return x
		else:
			return d[x]
	elif 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()


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)


import sys
input = sys.stdin.readline
n = int(input())
s = input().rstrip()
start = ['SS', 'SW', 'WS', 'WW']
import sys
for k in range(4):
	ans = start[k]
	for i in range(2, n):
		if ans[i - 2:i] == 'SS' and s[i - 1] == 'o' or (ans[i - 2:i] == 'SW' and s[i - 1] == 'x') or (ans[i - 2:i] == 'WS' and s[i - 1] == 'x') or (ans[i - 2:i] == 'WW' and s[i - 1] == 'o'):
			ans = ans + 'S'
		else:
			ans = ans + 'W'
	if s[0] == 'o' and ans[0] == 'S' or (s[0] == 'x' and ans[0] == 'W'):
		if ans[1] == ans[n - 1]:
			pass
		else:
			continue
	elif ans[1] == ans[n - 1]:
		continue
	if s[n - 1] == 'o' and ans[n - 1] == 'S' or (s[n - 1] == 'x' and ans[n - 1] == 'W'):
		if ans[0] == ans[n - 2]:
			pass
		else:
			continue
	elif ans[0] == ans[n - 2]:
		continue
	print(ans)
	sys.exit()
print(-1)


from itertools import product

def next_sw(ox, sw, prev_sw):
	if ox == 'o' and sw == 'S' or (ox == 'x' and sw == 'W'):
		return prev_sw
	else:
		return 'W' if prev_sw == 'S' else 'S'
N = int(input())
S = input()
ans = [None] * (N + 1)
ok = False
for (ans[0], ans[1]) in product('SW', 'SW'):
	for i in range(1, N):
		ans[i + 1] = next_sw(S[i], ans[i], ans[i - 1])
	if ans[0] == ans[-1] and ans[1] == next_sw(S[0], ans[0], ans[-2]):
		ok = True
		break
if ok:
	print(''.join(ans[:N]))
else:
	print(-1)


n = int(input())
sw = [0 for i in range(n)]
ox = list(input())

def who(x):
	if sw[x - 1] == 'S':
		a = 1
	else:
		a = -1
	if sw[x] == 'S':
		b = 1
	else:
		b = -1
	if ox[x] == 'o':
		c = 1
	else:
		c = -1
	if a * b * c == 1:
		return 'S'
	else:
		return 'W'
start = [['S', 'S'], ['S', 'W'], ['W', 'S'], ['W', 'W']]
ans = -1
for i in range(4):
	(sw[0], sw[-1]) = start[i]
	tmp1 = sw[-1]
	tmp2 = sw[0]
	for j in range(n):
		sw[(j + 1) % n] = who(j)
	if tmp1 == sw[-1] and tmp2 == sw[0]:
		ans = ''.join(sw)
print(ans)


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])
		exit()
print(-1)


def check(a: int, b: int) -> list:
	(ret, cur, prev) = ([], a, b)
	for i in S:
		ret += [cur]
		if cur ^ (i == 'o'):
			(prev, cur) = (cur, prev ^ 1)
		else:
			(prev, cur) = (cur, prev)
	flg = cur == a and prev == b
	return ret if flg else []

def main():
	global S
	N = int(input())
	S = input().rstrip()
	for a in range(2):
		for b in range(2):
			ans = check(a, b)
			if ans:
				print(*['S' if i else 'W' for i in ans], sep='')
				return
	print(-1)
main()


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')
			elif 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')
			elif 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
			elif ans[-1] != ans[1]:
				flag = 1
		elif ans[0] == 'W':
			if ans[-1] == ans[1]:
				flag = 1
		elif ans[-1] != ans[1]:
			flag = 1
		if flag == 1:
			print(''.join(ans))
			return
print(-1)


n = int(input())
s = input()
s += s[:2]
for ans in ['SS', 'SW', 'WW', 'WS']:
	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:]:
		print(ans[:n])
		exit()
print(-1)


N = int(input())
ST = input()
pat = [(0, 0), (0, 1), (1, 0), (1, 1)]
fl = False
for p in pat:
	ans = []
	x_now = p[0]
	x_prev = p[1]
	ans.append(x_now)
	for i in range(N):
		if ST[i] == 'o':
			if x_now == 0:
				x_next = x_prev
			else:
				x_next = 1 - x_prev
		elif x_now == 0:
			x_next = 1 - x_prev
		else:
			x_next = x_prev
		ans.append(x_next)
		(x_prev, x_now) = (x_now, x_next)
	if ans[-2] == p[1] and ans[-1] == ans[0]:
		fl = True
		break
if fl:
	for i in range(N):
		print('S' if ans[i] == 0 else 'W', end='')
	print()
else:
	print('-1')


_ = input()
s = input()
cands = ['SSS', 'SWW', 'WWS', 'WSW'] if s[0] == 'o' else ['WSS', 'SSW', 'SWS', 'WWW']
d = {'o': {'SS': 'S', 'SW': 'W', 'WW': 'S', 'WS': 'W'}, 'x': {'SS': 'W', 'SW': 'S', 'WW': 'W', 'WS': 'S'}}
for char in s[1:]:
	for i in range(len(cands)):
		cands[i] += d[char][cands[i][-2:]]
for cand in cands:
	if cand[:2] == cand[-2:]:
		print(cand[1:-1])
		break
else:
	print(-1)


N = int(input())
s = list(input())
s = list(map(lambda x: 0 if x == 'o' else 1, s))
ans = [0] * N
ans[0] = 1
ans[1] = 1
for _ in range(2):
	ans[0] ^= 1
	for __ in range(2):
		ans[1] ^= 1
		for i in range(2, N):
			ans[i] = -1
		for i in range(2, N):
			ans[i] = ans[i - 1] ^ s[i - 1] ^ ans[i - 2]
		if s[0] ^ ans[0] == ans[1] ^ ans[-1] and s[-1] ^ ans[-1] == ans[0] ^ ans[-2]:
			ans = list(map(lambda x: 'S' if x == 0 else 'W', ans))
			print(''.join(ans))
			exit()
print(-1)


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

def check(s, i, j, k):
	if j and s == 'o' and (i != k):
		return True
	elif j and s == 'x' and (i == k):
		return True
	elif not j and s == 'o' and (i == k):
		return True
	elif not j and s == 'x' and (i != k):
		return True
	return False

def func(f, s):
	l = [-1] * N
	l[0] = f
	l[1] = s
	for i in range(1, len(l) - 1):
		if l[i] and S[i] == 'o' or (not l[i] and S[i] == 'x'):
			l[i + 1] = l[i - 1] ^ 1
		else:
			l[i + 1] = l[i - 1]
	if check(S[-1], l[-2], l[-1], l[0]):
		if check(S[0], l[-1], l[0], l[1]):
			return l
	return False
for (i, j) in [(0, 0), (0, 1), (1, 1), (1, 0)]:
	l = func(i, j)
	if l:
		for v in l:
			print('SW'[v], end='')
		print()
		exit()
print(-1)


N = int(input())
S = list(map(str, input()))
flg = 0

def f(a, b, c):
	if a == 'S' and b == 'S' and (c == 'o'):
		return 'S'
	elif a == 'S' and b == 'S' and (c == 'x'):
		return 'W'
	elif a == 'S' and b == 'W' and (c == 'o'):
		return 'W'
	elif a == 'S' and b == 'W' and (c == 'x'):
		return 'S'
	elif a == 'W' and b == 'S' and (c == 'o'):
		return 'W'
	elif a == 'W' and b == 'S' and (c == 'x'):
		return 'S'
	elif a == 'W' and b == 'W' and (c == 'o'):
		return 'S'
	else:
		return 'W'
for (first, second) in [('S', 'S'), ('S', 'W'), ('W', 'S'), ('W', 'W')]:
	ans = [None] * N
	(ans[0], ans[1]) = (first, second)
	for i in range(1, N - 1):
		ans[i + 1] = f(ans[i - 1], ans[i], S[i])
	if f(ans[-2], ans[-1], S[-1]) == ans[0] and f(ans[-1], ans[0], S[0]) == ans[1]:
		flg = 1
		break
if flg:
	for a in ans:
		print(a, end='')
else:
	print(-1)


def d_Menagerie(N, S):
	s = S + S[0:2]
	for ans in ['SS', 'SW', 'WS', 'WW']:
		cond = False
		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:]:
			cond = True
			ans = ans[:N]
			break
	if cond:
		return ans
	else:
		return '-1'
	return None
N = int(input())
S = input().strip()
print(d_Menagerie(N, S))


n = int(input())
s = list(input())
for i in range(4):
	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'
		elif ans[2] == 'S':
			flg = False
		else:
			ans[2] = 'W'
	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'
		elif ans[2] == 'W':
			flg = False
		else:
			ans[2] = 'S'
	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'
		elif ans[2] == 'W':
			flg = False
		else:
			ans[2] = 'S'
	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'
		elif 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'
					elif ans[i + 1] == 'S':
						flg = False
					else:
						ans[i + 1] = 'W'
				elif ans[i - 1] == 'S':
					if ans[i + 1] == 'S':
						flg = False
					else:
						ans[i + 1] = 'W'
				elif ans[i + 1] == 'W':
					flg = False
				else:
					ans[i + 1] = 'S'
			elif s[i] == 'o':
				if ans[i - 1] == 'S':
					if ans[i + 1] == 'S':
						flg = False
					else:
						ans[i + 1] = 'W'
				elif ans[i + 1] == 'W':
					flg = False
				else:
					ans[i + 1] = 'S'
			elif ans[i - 1] == 'S':
				if ans[i + 1] == 'W':
					flg = False
				else:
					ans[i + 1] = 'S'
			elif 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
			elif ans[-2] == ans[0]:
				flg = False
		elif s[-1] == 'o':
			if ans[-2] == ans[0]:
				flg = False
		elif ans[-2] != ans[0]:
			flg = False
	if flg:
		print(''.join(ans))
		return
print(-1)


n = int(input())
s = input()
l = [0] * n
l2 = [0 if s[i] == 'o' else 1 for i in range(n)]

def f(x, y):
	l[0] = x
	l[1] = y
	for i in range(2, n):
		l[i] = l[i - 2] ^ l[i - 1] ^ l2[i - 1]
	if l[0] == l[n - 2] ^ l[n - 1] ^ l2[n - 1] and l[1] == l[n - 1] ^ l[0] ^ l2[0]:
		return True
	else:
		return False
if f(0, 0):
	print(''.join(['S' if not l[i] else 'W' for i in range(n)]))
elif f(0, 1):
	print(''.join(['S' if not l[i] else 'W' for i in range(n)]))
elif f(1, 0):
	print(''.join(['S' if not l[i] else 'W' for i in range(n)]))
elif f(1, 1):
	print(''.join(['S' if not l[i] else 'W' for i in range(n)]))
else:
	print(-1)


N = int(input())
s = input()
dic = ['SS', 'SW', 'WS', 'WW']
for i in range(4):
	ans = dic[i]
	state = ans[-1]
	for j in range(1, N):
		if state == 'S':
			if s[j] == 'o':
				ans += ans[j - 1]
			elif ans[j - 1] == 'S':
				ans += 'W'
			else:
				ans += 'S'
		elif s[j] == 'o':
			if ans[j - 1] == 'S':
				ans += 'W'
			else:
				ans += 'S'
		else:
			ans += ans[j - 1]
		state = ans[-1]
	if ans[0] == ans[-1]:
		ans = ans[:-1]
		if state == 'S':
			if s[0] == 'o':
				if ans[1] == ans[-1]:
					print(ans)
					break
			elif ans[1] != ans[-1]:
				print(ans)
				break
		elif s[0] == 'o':
			if ans[1] != ans[-1]:
				print(ans)
				break
		elif ans[1] == ans[-1]:
			print(ans)
			break
else:
	print(-1)


n = int(input())
s = input()
for i in range(4):
	a = [i % 2, i // 2]
	i = 1
	while i <= n:
		a.append(a[-2] ^ a[-1] ^ (s[i % n] == 'x'))
		i += 1
	if a[:2] == a[-2:]:
		for i in range(n):
			print('SW'[a[i]], end='')
		exit()
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')
		elif 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)


n = int(input())
s = input()
ok = 0
for ii in [[0, 0], [0, 1], [1, 0], [1, 1]]:
	A = [ii[0], ii[1]]
	for i in range(1, n - 1):
		A.append(int((A[-1] == 1) ^ (A[-2] == 1) ^ (s[i] == 'x')))
	if (A[-2] == 1) ^ (A[-1] == 1) ^ (A[0] == 1) ^ (s[-1] == 'o') and (A[-1] == 1) ^ (A[0] == 1) ^ (A[1] == 1) ^ (s[0] == 'o'):
		ok = 1
		break
if ok == 0:
	print(-1)
else:
	ans = []
	for i in range(n):
		if A[i] == 0:
			ans.append('S')
		else:
			ans.append('W')
	print(''.join(ans))


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


n = int(input())
s = input()
l = ['SS', 'SW', 'WS', 'WW']
for i in range(n):
	for j in range(len(l)):
		l[j] += 'SW'[::-1 if s[i] == 'o' else 1][l[j][i] == l[j][i + 1]]
for i in range(len(l)):
	if l[i][0] == l[i][n] and l[i][1] == l[i][n + 1]:
		print(l[i][1:n + 1])
		exit()
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()
p1 = ['W', 'W']
p2 = ['W', 'S']
p3 = ['S', 'W']
p4 = ['S', 'S']
p = [p1, p2, p3, p4]
for i in range(4):
	for j in range(n - 2):
		same = 0
		if p[i][j + 1] == 'S' and s[j + 1] == 'o' or (p[i][j + 1] == 'W' and s[j + 1] == 'x'):
			same = 1
		if same and p[i][j] == 'S' or (not same and p[i][j] == 'W'):
			p[i].append('S')
		else:
			p[i].append('W')
	f = 0
	same = 0
	if p[i][-1] == 'S' and s[-1] == 'o' or (p[i][-1] == 'W' and s[-1] == 'x'):
		same = 1
	if same and p[i][-2] == 'S' or (not same and p[i][-2] == 'W'):
		if p[i][0] == 'S':
			f = 1
	elif p[i][0] == 'W':
		f = 1
	if f == 0:
		continue
	f = 0
	same = 0
	if p[i][0] == 'S' and s[0] == 'o' or (p[i][0] == 'W' and s[0] == 'x'):
		same = 1
	if same and p[i][-1] == 'S' or (not same and p[i][-1] == 'W'):
		if p[i][1] == 'S':
			f = 1
	elif p[i][1] == 'W':
		f = 1
	if f:
		ans = ''
		for x in p[i]:
			ans += x
		print(ans)
		exit()
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])
		exit()
print(-1)


def check(a: str, b: str) -> str:
	(ret, cur, prev) = ('', a, b)
	for i in S:
		ret += cur
		if cur == 'S' and i == 'o' or (cur == 'W' and i == 'x'):
			(prev, cur) = (cur, prev)
		elif cur == 'S' and i == 'x' or (cur == 'W' and i == 'o'):
			x = 'W' if prev == 'S' else 'S'
			(prev, cur) = (cur, x)
	flg = cur == a and prev == b
	return ret if flg else ''

def main():
	global S
	N = int(input())
	S = input().rstrip()
	for a in ('S', 'W'):
		for b in ('S', 'W'):
			ans = check(a, b)
			if ans:
				print(ans)
				return
	print(-1)
main()


def main():
	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()


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
		elif 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())
c = 0
S = list()
for i in input():
	if i == 'o':
		S.append(0)
	else:
		S.append(1)
for i in [0, 1]:
	if c == 1:
		break
	for j in [0, 1]:
		t = list()
		t.append(i)
		t.append(j)
		for k in range(1, N - 1):
			t.append(S[k] ^ t[k] ^ t[k - 1])
		if (S[0] ^ t[0] ^ t[-1] == t[1]) & (S[-1] ^ t[-1] ^ t[-2] == t[0]):
			c = 1
			break
if c == 1:
	ans = ''
	for i in t:
		if i == 0:
			ans = ans + 'S'
		else:
			ans = ans + 'W'
	print(ans)
else:
	print('-1')


def main():
	N = int(input())
	s = input()
	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()


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'
print(solve(int(input()), input()))


N = int(input())
S = input()
first_state_circle = [[0, 0, 0], [0, 1, 1], [1, 0, 1], [1, 1, 0]]
first_state_cross = [[0, 0, 1], [0, 1, 0], [1, 0, 0], [1, 1, 1]]
transtable = str.maketrans({'0': 'S', '1': 'W'})
if S[0] == 'o':
	first_state = first_state_circle
else:
	first_state = first_state_cross
for state in first_state:
	lst = [-1] * N
	lst[0] = state[0]
	lst[1] = state[1]
	for i in range(1, N - 1):
		lst[i + 1] = (lst[i - 1] + lst[i] + (S[i] == 'x')) % 2
	if lst[N - 1] != state[2]:
		continue
	if lst[0] != (lst[N - 2] + lst[N - 1] + (S[N - 1] == 'x')) % 2:
		continue
	ans = ''.join(map(str, lst)).translate(transtable)
	print(ans)
	exit()
else:
	print('-1')


import sys
input = sys.stdin.readline

def main():
	N = int(input())
	S = input()
	for key in ['SS', 'SW', 'WS', 'WW']:
		animals = list(key)
		for i in range(N + 1):
			if i < 1:
				continue
			S_i = S[i] if i < N else S[0]
			if animals[i] == 'S':
				if S_i == 'o':
					animals += animals[-2]
				else:
					animals += 'S' if animals[-2] == 'W' else 'W'
			elif S_i == 'x':
				animals += animals[-2]
			else:
				animals += 'S' if animals[-2] == 'W' else 'W'
		if animals[0] == animals[-2] and animals[1] == animals[-1]:
			print(''.join(animals[:-2]))
			exit(0)
	print(-1)
main()


N = int(input())
S = input()
T = [['S', 'S'], ['S', 'W'], ['W', 'S'], ['W', 'W']]
for t in T:
	for i in range(1, N - 1):
		if t[i] == 'S' and S[i] == 'o' or (t[i] == 'W' and S[i] == 'x'):
			t.append(t[i - 1])
		else:
			t.append('S' if t[i - 1] == 'W' else 'W')
	flag = 1
	if t[0] == 'S' and S[0] == 'o' or (t[0] == 'W' and S[0] == 'x'):
		if t[-1] != t[1]:
			flag = 0
	elif t[-1] == t[1]:
		flag = 0
	if t[-1] == 'S' and S[-1] == 'o' or (t[-1] == 'W' and S[-1] == 'x'):
		if t[-2] != t[0]:
			flag = 0
	elif t[-2] == t[0]:
		flag = 0
	if flag:
		print(''.join(t))
		exit()
print(-1)


n = int(input())
s = input()
a = False
b = False
sw = [None] * n
sw[0] = True
sw[1] = True

def next(s, sw, j, i):
	if s[i] == 'o':
		return not sw[j] ^ sw[i]
	else:
		return sw[j] ^ sw[i]

def printsw(sw, n):
	s = ''
	for i in range(n):
		if sw[i]:
			s += 'S'
		else:
			s += 'W'
	print(s)
flag = True
for j in range(4):
	for i in range(2, n):
		sw[i] = next(s, sw, i - 2, i - 1)
	zero = next(s, sw, n - 2, n - 1)
	one = next(s, sw, n - 1, 0)
	if zero == sw[0]:
		if one == sw[1]:
			printsw(sw, n)
			flag = False
			break
	sw[0] = not sw[0]
	if j == 1:
		sw[1] = False
if flag:
	print(-1)


from itertools import product
N = int(input())
S = input()

def r(x):
	if x == 'S':
		return 'W'
	else:
		return 'S'

def f(x1, x2, s):
	if s == 'o':
		if x1 == 'S':
			return x2
		else:
			return r(x2)
	elif x1 == 'S':
		return r(x2)
	else:
		return x2
ans = ['-1']
for (x1, x2) in product('SW', repeat=2):
	res = [x1, x2]
	for i in range(N):
		(x1, x2) = (x2, f(x1, x2, S[i]))
		res.append(x2)
	if res[:2] == res[-2:]:
		ans = res[1:-1]
		break
print(''.join(ans))


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

def f(SW, ox, prev):
	if SW == 'S':
		if ox == 'o':
			if prev == 'S':
				return 'S'
			else:
				return 'W'
		elif prev == 'S':
			return 'W'
		else:
			return 'S'
	elif ox == 'o':
		if prev == 'S':
			return 'W'
		else:
			return 'S'
	elif 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 reset(n):
	a = [0 for i in range(n + 2)]
	return a
n = int(input())
s = list(input())
s.append(s[0])
dt = [[1, 1], [-1, 1], [1, -1], [-1, -1]]
ans = False
for i in range(4):
	li = reset(n)
	li[0] = dt[i][0]
	li[1] = dt[i][1]
	for j in range(1, len(s)):
		if s[j] == 'o':
			li[j + 1] = li[j] * li[j - 1]
		elif s[j] == 'x':
			li[j + 1] = li[j] * li[j - 1] * -1
	if li[0] == li[n] and li[1] == li[n + 1]:
		ans = True
		break
if ans:
	for i in range(n):
		if li[i] == 1:
			print('S', end='')
		else:
			print('W', end='')
	print('')
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])
		elif 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)


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'
		elif s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif l[i - 1] == 'S':
		if s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif 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
				elif l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
		elif l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif s[n - 1] == 'o':
		if l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif 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
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif s[n - 1] == 'o':
	if l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif l[0] == 'W':
	if s[0] == 'o':
		if l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
	elif 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'
		elif s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif l[i - 1] == 'S':
		if s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif 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
				elif l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
		elif l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif s[n - 1] == 'o':
		if l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif 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
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif s[n - 1] == 'o':
	if l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif l[0] == 'W':
	if s[0] == 'o':
		if l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
	elif 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'
		elif s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif l[i - 1] == 'S':
		if s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif 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
				elif l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
		elif l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif s[n - 1] == 'o':
		if l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif 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
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif s[n - 1] == 'o':
	if l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif l[0] == 'W':
	if s[0] == 'o':
		if l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
	elif 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'
		elif s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif l[i - 1] == 'S':
		if s[i] == 'o':
			l[i + 1] = 'W'
		else:
			l[i + 1] = 'S'
	elif 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
				elif l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
		elif l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif s[n - 1] == 'o':
		if l[0] == 'W':
			if s[0] == 'o':
				if l[n - 1] != l[1]:
					l = ''.join(l)
					print(l)
					return
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif 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
			elif l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
	elif l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif s[n - 1] == 'o':
	if l[0] == 'S':
		if s[0] == 'o':
			if l[n - 1] == l[1]:
				l = ''.join(l)
				print(l)
				return
		elif l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
elif l[0] == 'W':
	if s[0] == 'o':
		if l[n - 1] != l[1]:
			l = ''.join(l)
			print(l)
			return
	elif l[n - 1] == l[1]:
		l = ''.join(l)
		print(l)
		return
print(-1)


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

def make(s1, s2):
	a = [s1, s2]
	for i in range(N):
		(s1, s2) = a[-2:]
		if s2 == 'S':
			if s[i] == 'o':
				s0 = s1
			else:
				s0 = d[s1]
		elif s[i] == 'o':
			s0 = d[s1]
		else:
			s0 = s1
		a.append(s0)
	return a
for s1 in ['S', 'W']:
	for s2 in ['S', 'W']:
		a = make(s1, s2)
		possible = a[:2] == a[-2:]
		if possible:
			break
	if possible:
		break
if possible:
	print(''.join(a[1:N + 1]))
else:
	print(-1)


N = int(input())
S = input()
opposite = {'S': 'W', 'W': 'S'}
for ans in ['SS', 'SW', 'WS', 'WW']:
	for i in range(1, N - 1):
		if (ans[i], S[i]) in [('S', 'o'), ('W', 'x')]:
			ans += ans[i - 1]
		elif (ans[i], S[i]) in [('S', 'x'), ('W', 'o')]:
			ans += opposite[ans[i - 1]]
	for i in [-1, 0]:
		if ans[i] == 'S':
			if S[i] == 'o' and ans[i - 1] != ans[i + 1] or (S[i] == 'x' and ans[i - 1] == ans[i + 1]):
				break
		elif S[i] == 'o' and ans[i - 1] == ans[i + 1] or (S[i] == 'x' and ans[i - 1] != ans[i + 1]):
			break
	else:
		print(ans)
		break
else:
	print(-1)


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

def notanim(t):
	if t == 'S':
		return 'W'
	else:
		return 'S'

def nextAnimal(ts, s):
	if ts[1] == 'S':
		if s == 'o':
			return ts[0]
		else:
			return notanim(ts[0])
	elif ts[1] == 'W':
		if s == 'o':
			return notanim(ts[0])
		else:
			return ts[0]

def maket(n, s, init_t):
	t = init_t
	new_s = s[1:] + s[0]
	for i in range(n):
		t += nextAnimal(t[-2:], new_s[i])
	return t
n = int(input())
s = input()
flag = True
for init_t in init_ts:
	tmp_t = maket(n, s, init_t)
	if tmp_t[-2:] == init_t:
		print(tmp_t[:-2])
		flag = False
		break
	else:
		pass
if flag:
	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])
		elif 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)


N = int(input())
S = input()
a = {'S': 'W', 'W': 'S'}
for (t0, t1) in ('SS', 'SW', 'WS', 'WW'):
	T = [t0, t1]
	for i in range(2, N + 2):
		if S[(i - 1) % N] == 'o' and T[-1] == 'S' or (S[(i - 1) % N] == 'x' and T[-1] == 'W'):
			T.append(T[-2])
		else:
			T.append(a[T[-2]])
	if T[0] == T[-2] and T[1] == T[-1]:
		print(''.join(T[:-2]))
		exit()
print(-1)


N = int(input())
s = input()
animals = ['SS', 'SW', 'WS', 'WW']
for (i, animal) in enumerate(animals):
	for j in range(N):
		a = 1 if animals[i][-1] == 'S' else -1
		b = 1 if animals[i][-2] == 'S' else -1
		c = 1 if s[(j + 1) % N] == 'o' else -1
		animals[i] += 'S' if a * b * c > 0 else 'W'
ans = -1
for animal in animals:
	if animal[:2] == animal[-2:]:
		ans = animal[:N]
print(ans)


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


N = int(input())
s = input()
s += s[0]
l = [0] * (N + 2)
for (a0, a1) in ((0, 0), (0, 1), (1, 0), (1, 1)):
	(l[0], l[1]) = (a0, a1)
	for i in range(1, N + 1):
		if s[i] == 'o':
			l[i + 1] = not l[i] ^ l[i - 1]
		else:
			l[i + 1] = l[i] ^ l[i - 1]
	if l[0] == l[-2] and l[1] == l[-1]:
		print(*['S' if i == 1 else 'W' for i in l[:-2]], sep='')
		exit()
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()
ans = '-1'
for animals in ['SS', 'SW', 'WS', 'WW']:
	for say in s:
		if animals[-1] == 'S' and say == 'o' or (animals[-1] == 'W' and say == 'x'):
			animals += animals[-2]
		elif animals[-1] == 'S' and say == 'x':
			if animals[-2] == 'S':
				animals += 'W'
			else:
				animals += 'S'
		elif animals[-1] == 'W' and say == 'o':
			if animals[-2] == 'S':
				animals += 'W'
			else:
				animals += 'S'
	if animals[:2] == animals[-2:]:
		ans = animals[1:-1]
print(ans)


def make(l, ai):
	global N
	for i in range(2, N):
		ai.append(ai[i - 2] == (ai[i - 1] == l[i - 1]))
	return ai

def check(l, ai):
	return ai[0] == (ai[-2] == (ai[-1] == l[-1])) and ai[1] == (ai[-1] == (ai[0] == l[0]))
N = int(input())
l = [c == 'o' for c in input()]
f = False
a = [[True, True], [True, False], [False, True], [False, False]]
for ai in a:
	ai = make(l, ai)
f = False
for ai in a:
	if check(l, ai):
		for aij in ai:
			print('S' if aij else 'W', end='')
		f = True
		break
if not f:
	print(-1)


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]
		elif 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
	elif 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
	elif t[i][-2] == t[i][0]:
		flag = False
	if flag:
		print(*t[i], sep='')
		return
print(-1)


import sys
input = sys.stdin.readline

def main():
	N = int(input())
	s = input().strip()
	next_o = {'SS': 'S', 'SW': 'W', 'WS': 'W', 'WW': 'S'}
	next_x = {'SS': 'W', 'SW': 'S', 'WS': 'S', 'WW': 'W'}
	for ans in ['SS', 'SW', 'WS', 'WW']:
		for i in range(1, N):
			if s[i] == 'o':
				ans += next_o[ans[-2:]]
			else:
				ans += next_x[ans[-2:]]
		if ans[0] == ans[-1]:
			if s[0] == 'o':
				if ans[1] == next_o[ans[-2:]]:
					print(ans[:-1])
					return
			elif ans[1] == next_x[ans[-2:]]:
				print(ans[:-1])
				return
	print(-1)
main()


def check(listx, s):
	num = (listx[-2] + listx[1]) % 2
	if num != listx[0] and s[0] == 'o':
		return True
	elif num == listx[0] and s[0] == 'x':
		return True
	else:
		return False
n = int(input())
s = input()
(x, flag, ans) = ([[1, 1], [1, 0], [0, 1], [0, 0]], False, '')
for i in range(4):
	for j in range(1, n):
		if s[j] == 'o' and x[i][-1] == 1 or (s[j] == 'x' and x[i][-1] == 0):
			x[i].append(x[i][-2])
		else:
			x[i].append(1 - x[i][-2])
	if x[i][0] == x[i][-1] and check(x[i], s):
		flag = True
		break
if flag:
	for k in x[i][:n]:
		if k == 1:
			ans += 'S'
		else:
			ans += 'W'
	print(ans)
else:
	print(-1)


n = int(input())
s = input()
animals = ['#'] * len(s)

def oppositeAnimal(animal):
	if animal == 'S':
		return 'W'
	else:
		return 'S'

def getNextAnimal(animal, answer, pastanimal):
	if animal == 'S':
		if answer == 'o':
			return pastanimal
		else:
			return oppositeAnimal(pastanimal)
	elif answer == 'o':
		return oppositeAnimal(pastanimal)
	else:
		return pastanimal
for a0 in ('S', 'W'):
	for a1 in ('S', 'W'):
		animals = ['#'] * len(s)
		animals[0] = a0
		animals[1] = a1
		for i in range(2, len(s)):
			animals[i] = getNextAnimal(animals[i - 1], s[i - 1], animals[i - 2])
		if getNextAnimal(animals[len(s) - 1], s[len(s) - 1], animals[len(s) - 2]) == animals[0]:
			if getNextAnimal(animals[0], s[0], animals[len(s) - 1]) == animals[1]:
				print(''.join(animals))
				exit(0)
print(-1)


N = int(input())
S = input()
S = S[1:] + S[0]
animal = ['WW', 'WS', 'SW', 'SS']
for pair in animal:
	(a, b) = (pair[0], pair[1])
	(pre, nex) = (a, b)
	answer = [a, b]
	for i in range(N):
		if nex == 'S' and S[i] == 'o' or (nex == 'W' and S[i] == 'x'):
			tmp = nex
			nex = pre
			pre = tmp
			answer.append(nex)
		else:
			tmp = nex
			nex = 'W' if pre == 'S' else 'S'
			pre = tmp
			answer.append(nex)
	if nex == b and pre == a:
		print(''.join(answer[:-2]))
		break
else:
	print(-1)


n = int(input())
l = list(input())
l += l[0]
check = [[1, 1], [1, -1], [-1, 1], [-1, -1]]
for (j, k) in check:
	ans = [j, k]
	for i in range(1, n + 1):
		if ans[i] == 1:
			if l[i] == 'o':
				ans.append(ans[i - 1])
			else:
				ans.append(-ans[i - 1])
		elif l[i] == 'o':
			ans.append(-ans[i - 1])
		else:
			ans.append(ans[i - 1])
	if ans[1] == ans[-1] and ans[0] == ans[-2]:
		for i in ans[:-2]:
			if i == 1:
				print('S', end='')
			else:
				print('W', end='')
		exit()
print(-1)


n = int(input())
s = input()
ss = 'SS'
sw = 'SW'
ws = 'WS'
ww = 'WW'

def f(t, c):
	if t == 'o':
		if c[-2:] == 'SS' or c[-2:] == 'WW':
			return c + 'S'
		else:
			return c + 'W'
	elif c[-2:] == 'SW' or c[-2:] == 'WS':
		return c + 'S'
	else:
		return c + 'W'
for i in s[1:n - 1]:
	ss = f(i, ss)
	sw = f(i, sw)
	ws = f(i, ws)
	ww = f(i, ww)

def a(s, c):
	if f(s[-1], c[-2:])[2] != c[0]:
		return 0
	if f(s[0], c[-1] + c[0])[2] != c[1]:
		return 0
	return 1
for i in [ss, sw, ws, ww]:
	if a(s, i):
		print(i)
		break
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)


n = int(input())
s = input()
ans = ['SS', 'SW', 'WS', 'WW']
for i in range(4):
	for j in range(1, n):
		if s[j] == 'o' and ans[i][j] == 'S':
			ans[i] += ans[i][j - 1]
		elif s[j] == 'o' and ans[i][j] == 'W':
			ans[i] += 'W' if ans[i][j - 1] == 'S' else 'S'
		elif s[j] == 'x' and ans[i][j] == 'S':
			ans[i] += 'W' if ans[i][j - 1] == 'S' else 'S'
		else:
			ans[i] += ans[i][j - 1]
	if ans[i][0] == ans[i][n]:
		if ans[i][n - 1] == ans[i][1] and (s[0] == 'o' and ans[i][0] == 'S' or (s[0] == 'x' and ans[i][0] == 'W')):
			print(ans[i][:-1])
			break
		if ans[i][n - 1] != ans[i][1] and (s[0] == 'o' and ans[i][0] == 'W' or (s[0] == 'x' and ans[i][0] == 'S')):
			print(ans[i][:-1])
			break
else:
	print(-1)


n = int(input())
s = input()
ans = '-1'
for animals in ['SS', 'SW', 'WS', 'WW']:
	for say in s:
		if (animals[-1] == 'S') != ((say == 'o') != (animals[-2] == 'S')):
			animals += 'S'
		else:
			animals += 'W'
	if animals[:2] == animals[-2:]:
		ans = animals[1:-1]
print(ans)


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
					elif ans[t] == 'W':
						flag += 1
				elif ans[j - 1] == 'S':
					if ans[t] == 'W':
						flag += 1
				elif ans[t] == 'S':
					flag += 1
			elif S[j] == 'o':
				if ans[j - 1] == 'S':
					if ans[t] == 'W':
						flag += 1
				elif ans[t] == 'S':
					flag += 1
			elif ans[j - 1] == 'S':
				if ans[t] == 'S':
					flag += 1
			elif ans[t] == 'W':
				flag += 1
		elif ans[j] == 'S':
			if S[j] == 'o':
				if ans[j - 1] == 'S':
					ans.append('S')
				else:
					ans.append('W')
			elif ans[j - 1] == 'S':
				ans.append('W')
			else:
				ans.append('S')
		elif S[j] == 'o':
			if ans[j - 1] == 'S':
				ans.append('W')
			else:
				ans.append('S')
		elif 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 = 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)


input()
s = input()
A = ['SS', 'SW', 'WS', 'WW']
for c in s:
	A = [t + 'SW'[(t[-1] == t[-2]) - (c == 'o')] for t in A]
A = [t[1:-1] for t in A if t[:2] == t[-2:]]
print(A[0] if A else -1)


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

def func(a, b):
	ans = [a, b]
	for i in range(1, n):
		if s[i] == 'o':
			if ans[-1]:
				ans.append(ans[-2])
			else:
				ans.append(not ans[-2])
		elif ans[-1]:
			ans.append(not ans[-2])
		else:
			ans.append(ans[-2])
	if ans[0] == ans[-1]:
		flg = False
		if s[0] == 'o' and a and (ans[1] == ans[-2]):
			flg = True
		elif s[0] == 'o' and (not a) and (ans[1] != ans[-2]):
			flg = True
		elif s[0] == 'x' and a and (ans[1] != ans[-2]):
			flg = True
		elif s[0] == 'x' and (not a) and (ans[1] == ans[-2]):
			flg = True
		if flg:
			print(''.join(['S' if ansi else 'W' for ansi in ans[:-1]]))
			exit()
func(True, True)
func(True, False)
func(False, True)
func(False, False)
print(-1)


N = int(input())
S = input()
for s in range(2):
	for t in range(2):
		T = [None] * N
		T[0] = s
		T[1] = t
		for j in range(1, N - 1):
			if (T[j] == 0) == (S[j] == 'o'):
				T[j + 1] = T[j - 1]
			else:
				T[j + 1] = 1 - T[j - 1]
		if ((T[N - 1] == 0) == (S[N - 1] == 'o')) == (T[N - 2] == T[0]):
			if ((s == 0) == (S[0] == 'o')) == (T[N - 1] == t):
				ans = [None] * N
				for i in range(N):
					ans[i] = ['S', 'W'][T[i]]
				print(''.join(ans))
				exit()
print(-1)


N = int(input())
s = input()
SW_list = ['SS', 'SW', 'WS', 'WW']
check = False
for sw in SW_list:
	ans = [''] * N
	ans[0] = sw[0]
	ans[1] = sw[1]
	for i in range(1, N - 1):
		if ans[i] == 'S' and s[i] == 'o' or (ans[i] == 'W' and s[i] == 'x'):
			ans[i + 1] = ans[i - 1]
		else:
			ans[i + 1] = 'S' if ans[i - 1] == 'W' else 'W'
	if ans[0] == 'S' and s[0] == 'o' or (ans[0] == 'W' and s[0] == 'x'):
		if ans[1] == ans[-1]:
			check = True
	elif ans[1] != ans[-1]:
		check = True
	if ans[-1] == 'S' and s[-1] == 'o' or (ans[-1] == 'W' and s[-1] == 'x'):
		if ans[0] != ans[-2]:
			check = False
	elif ans[0] == ans[-2]:
		check = False
	if check:
		print(*ans, sep='')
		break
if check == False:
	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]
				elif ans[j - 1] == 'S':
					ans[j + 1] = 'W'
				else:
					ans[j + 1] = 'S'
			elif s == 'x':
				ans[j + 1] = ans[j - 1]
			elif 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
				elif ans[N - 1] != ans[N - 3]:
					flag = 1
			elif s == 'x':
				if ans[N - 1] == ans[N - 3]:
					flag = 1
			elif 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
				elif ans[N - 2] != ans[0]:
					print(''.join(ans))
					return
			elif s == 'x':
				if ans[N - 2] == ans[0]:
					print(''.join(ans))
					return
			elif ans[N - 2] != ans[0]:
				print(''.join(ans))
				return
print(-1)


def check(N, S, ans):
	for i in range(N):
		if (ans[i] == 'S') ^ (S[i] == 'o'):
			if ans[(i - 1) % N] == ans[(i + 1) % N]:
				return False
		elif ans[(i - 1) % N] != ans[(i + 1) % N]:
			return False
	return True

def main():
	N = int(input())
	S = input()
	initials = ['SS', 'SW', 'WS', 'WW']
	for init in initials:
		ans = [''] * N
		ans[0] = init[0]
		ans[1] = init[1]
		for i in range(1, N - 1):
			if (ans[i] == 'S') ^ (S[i] == 'o'):
				ans[i + 1] = 'W' if ans[i - 1] == 'S' else 'S'
			else:
				ans[i + 1] = ans[i - 1]
		if check(N, S, ans):
			print(''.join(ans))
			return
	print(-1)
main()


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

def check(ox, l, m, r):
	if l == r:
		if m == 'S' and ox == 'o' or (m == 'W' and ox == 'x'):
			return True
		else:
			return False
	else:
		return not check(ox, l, m, l)
for one in 'SW':
	for two in 'SW':
		a = one + two
		for i in range(2, n):
			if check(s[i - 1], a[i - 2], a[i - 1], 'S'):
				a += 'S'
			else:
				a += 'W'
		if check(s[n - 1], a[n - 2], a[n - 1], a[0]) and check(s[0], a[n - 1], a[0], a[1]):
			print(a)
			exit()
print(-1)


input()
s = input()
pair = ['SS', 'SW', 'WS', 'WW']
replace = {'S': 'W', 'W': 'S'}
hasFound = False
for i in pair:
	for j in s[1:]:
		if j is 'o':
			if i[-1] is 'S':
				i += i[-2]
			else:
				i += replace[i[-2]]
		elif i[-1] is 'S':
			i += replace[i[-2]]
		else:
			i += i[-2]
	if i[0] is i[-1]:
		if s[0] == 'o':
			hasFound = i[0] is 'S' and i[-2] is i[1] or (i[0] is 'W' and i[-2] is not i[1])
		else:
			hasFound = i[0] is 'S' and i[-2] is not i[1] or (i[0] is 'W' and i[-2] is i[1])
	if hasFound:
		print(i[:-1])
		break
if not hasFound:
	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)

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

def warshall_floyd(d, n):
	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):
	d = [10 ** 20] * n
	used = [True] * n
	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

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)

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 = []
		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
		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'
		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)


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

def SorW(i, now, pre):
	if s[i] == 'o':
		if now == 'S':
			return pre
		elif now == 'W':
			return 'S' if pre == 'W' else 'W'
	elif s[i] == 'x':
		if now == 'S':
			return 'S' if pre == 'W' else 'W'
		elif now == 'W':
			return pre
if s[0] == 'o':
	Ini = ['SSS', 'WSW', 'SWW', 'WWS']
else:
	Ini = ['SSW', 'WSS', 'SWS', 'WWW']
for start in Ini:
	(pre, now) = (start[1], start[2])
	(ans, i) = (pre + now, 1)
	while i <= N - 1:
		next = SorW(i, now, pre)
		(now, pre) = (next, now)
		i += 1
		ans += next
	if start[1] == now and start[0] == pre:
		print(ans[:-1])
		break
else:
	print(-1)


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())
s = input()
ch = ['S', 'W']
for c1 in range(2):
	for c0 in range(2):
		if ch[c1] == 'S' and s[1] == 'o' or (ch[c1] == 'W' and s[1] == 'x'):
			ans = ch[c0] + ch[c1] + ch[c0]
		else:
			ans = ch[c0] + ch[c1] + ch[(c0 + 1) % 2]
		i = 2
		while i < n - 1:
			if ans[-1] == 'S' and s[i] == 'o' or (ans[-1] == 'W' and s[i] == 'x'):
				ans += ans[-2]
			else:
				ans += 'W' if ans[-2] == 'S' else 'S'
			i += 1
		for i in range(n):
			bc = ans[(i - 1 + n) % n]
			ac = ans[(i + 1) % n]
			if ans[i] == 'S' and s[i] == 'o' or (ans[i] == 'W' and s[i] == 'x'):
				if bc != ac:
					break
			elif bc == ac:
				break
		else:
			print(ans)
			exit(0)
print(-1)


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
elif 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
elif 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
elif 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
elif 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)


def derive_adjacency(animal, statement, neighbor):
	if animal + statement in ['So', 'Wx']:
		return neighbor
	else:
		return 'W' if neighbor == 'S' else 'S'
input()
S = input()
for (a, b) in ['SS', 'SW', 'WS', 'WW']:
	tmp = derive_adjacency(a, S[0], b) + a + b
	for c in S[1:]:
		tmp += derive_adjacency(tmp[-1], c, tmp[-2])
	if tmp[:2] == tmp[-2:]:
		print(tmp[1:-1])
		break
else:
	print(-1)


N = int(input())
s = input().strip()

def check(a, b):
	v = [0] * N
	v[0] = a
	v[1] = b
	for i in range(1, N - 1):
		if s[i] == 'o':
			if v[i]:
				v[i + 1] = v[i - 1]
			else:
				v[i + 1] = not v[i - 1]
		elif v[i]:
			v[i + 1] = not v[i - 1]
		else:
			v[i + 1] = v[i - 1]
	ok = True
	for i in range(N):
		same = v[(i - 1) % N] == v[(i + 1) % N]
		if s[i] == 'o':
			if v[i] != same:
				ok = False
		elif v[i] == same:
			ok = False
	return v if ok else None
p = [[True, True], [False, False], [True, False], [False, True]]
ans = '-1'
for (a, b) in p:
	l = check(a, b)
	if l != None:
		ans = ''.join(['S' if v else 'W' for v in l])
		break
print(ans)


n = int(input())
s = input()
s = list(s)
for i in range(len(s)):
	if s[i] == 'o':
		s[i] = int(1)
	else:
		s[i] = int(-1)
syoki_list = [[1, 1], [1, -1], [-1, 1], [-1, -1]]
a = '-1'
for i in range(len(syoki_list)):
	t = []
	t.append(syoki_list[i][0])
	t.append(syoki_list[i][1])
	for j in range(2, n + 1):
		t.append(t[j - 2] * t[j - 1] * s[j - 1])
	if t[0] == t[n] and t[1] == t[n - 1] * t[n] * s[0]:
		for i in range(n + 1):
			if t[i] == 1:
				t[i] = 'S'
			else:
				t[i] = 'W'
		a = ''.join(t[:n])
		break
print(a)


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')
		elif ((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))
			sys.exit()
print(-1)


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()


import itertools
N = int(input())
s = list(map(lambda x: True if x == 'o' else False, list(input())))
f = lambda x, y: not x ^ y

def hantei(N, s):
	for onetwo in itertools.product((True, False), (True, False)):
		res = {}
		for n in range(N):
			if n == 0:
				res[n] = onetwo[0]
			elif n == 1:
				res[n] = onetwo[1]
			else:
				res[n] = f(res[n - 2], f(res[n - 1], s[n - 1]))
		if not (res[1] == res[N - 1]) ^ res[0] == s[0]:
			if not (res[0] == res[N - 2]) ^ res[N - 1] == s[N - 1]:
				print(''.join(map(lambda x: 'S' if x == True else 'W', res.values())))
				return True
	return False
if not hantei(N, s):
	print(-1)


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])
		elif 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)


import sys

def SorW(i):
	if i == 0:
		j = N - 1
	else:
		j = i - 1
	if t[i] == 'S' and t[j] == 'S':
		if s[i] == 'o':
			a = 'S'
		else:
			a = 'W'
	elif t[i] == 'S' and t[j] == 'W':
		if s[i] == 'o':
			a = 'W'
		else:
			a = 'S'
	elif t[i] == 'W' and t[j] == 'W':
		if s[i] == 'o':
			a = 'S'
		else:
			a = 'W'
	elif s[i] == 'o':
		a = 'W'
	else:
		a = 'S'
	return a
N = int(input())
s = str(input())
for t in [['S', 'S'], ['S', 'W'], ['W', 'W'], ['W', 'S']]:
	for i in range(1, N):
		t.append(SorW(i))
	if t[0] == t[N] and t[1] == SorW(0):
		del t[N]
		print(''.join(t))
		sys.exit()
print('-1')


import sys
sys.setrecursionlimit(2147483647)
INF = float('inf')
MOD = 10 ** 9 + 7
input = lambda : sys.stdin.readline().rstrip()

def resolve():
	n = int(input())
	S = list(map(lambda x: (x == 'o') - 0, input()))
	from itertools import product
	for (a, b) in product(range(2), repeat=2):
		ans = [None] * n
		ans[0] = a
		ans[1] = b
		for i in range(2, n):
			if S[i - 1] == ans[i - 1]:
				ans[i] = ans[i - 2]
			else:
				ans[i] = 1 - ans[i - 2]
		if (S[0] == ans[0]) == (ans[1] == ans[-1]) and (S[-1] == ans[-1]) == (ans[0] == ans[-2]):
			for s in ans:
				print('S' if s else 'W', end='')
			print()
			return
	print(-1)
resolve()


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]))
		exit()
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')
		elif 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)


def d_menagerie(N, S):
	s = S + S[0:2]
	for ans in ['SS', 'SW', 'WS', 'WW']:
		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:]:
			ans = ans[:N]
			break
	else:
		ans = '-1'
	return ans
N = int(input())
S = input().strip()
print(d_menagerie(N, S))


N = int(input())
S = input()
(L1, L2, L3, L4) = ('SS', 'SW', 'WS', 'WW')

def make_seq(L):
	for i in range(1, N - 1):
		if S[i] + L[i - 1] + L[i] in ['oSS', 'oWW', 'xSW', 'xWS']:
			L += 'S'
		else:
			L += 'W'
	return L
T = ['oSSS', 'oWSW', 'oSWW', 'oWWS', 'xWSS', 'xSSW', 'xSWS', 'xWWW']

def check(L):
	if S[0] + L[-1] + L[0] + L[1] in T and S[-1] + L[-2] + L[-1] + L[0] in T:
		return L
	else:
		return -1
L1 = make_seq(L1)
L2 = make_seq(L2)
L3 = make_seq(L3)
L4 = make_seq(L4)
C = [check(L1), check(L2), check(L3), check(L4)]
import sys
for i in C:
	if i != -1:
		print(i)
		sys.exit()
print(-1)


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

def calcnext(a, b, c):
	if b == 'W':
		c = 'x' if c == 'o' else 'o'
	n = a if c == 'o' else 'S' if a == 'W' else 'W'
	return n
for ab in ['SS', 'SW', 'WS', 'WW']:
	l = list(ab)
	for i in range(2, N + 2):
		n = calcnext(l[i - 2], l[i - 1], s[(i - 1) % N])
		l.append(n)
	if l[N:N + 2] == l[0:2]:
		print(''.join(l[:N]))
		exit()
print(-1)


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
				elif ans[k - 2] == 'S':
					c = 1
				else:
					c = 0
			elif ans[k - 1] == 'S':
				if ans[k - 2] == 'S':
					c = 1
				else:
					c = 0
			elif 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
			elif ans[1] != ans[n - 1]:
				m += 1
		elif ans[0] == 'W':
			if ans[1] == ans[n - 1]:
				m += 1
		elif 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
			elif ans[0] != ans[n - 2]:
				m += 1
		elif ans[n - 1] == 'W':
			if ans[0] == ans[n - 2]:
				m += 1
		elif ans[0] != ans[n - 2]:
			m += 1
		if m == 2:
			print(''.join(ans))
			return
print(-1)


N = int(input())
s = input()
l = [1] * N
for (a0, a1) in ((0, 0), (0, 1), (1, 0), (1, 1)):
	l[0] = a0
	l[1] = a1
	for i in range(1, N - 1):
		if s[i] == 'o':
			if l[i] == 1:
				l[i + 1] = l[i - 1]
			else:
				l[i + 1] = not l[i - 1]
		elif l[i] == 1:
			l[i + 1] = not l[i - 1]
		else:
			l[i + 1] = l[i - 1]
	if s[-1] == 'o':
		if l[-1] == 1:
			flag = l[0] == l[-2]
		else:
			flag = l[0] != l[-2]
	elif l[-1] == 1:
		flag = l[0] != l[-2]
	else:
		flag = l[0] == l[-2]
	if flag:
		if s[0] == 'o':
			if l[0] == 1:
				flag = l[-1] == l[1]
			else:
				flag = l[-1] != l[1]
		elif l[0] == 1:
			flag = l[-1] != l[1]
		else:
			flag = l[-1] == l[1]
	if flag:
		s = ''.join(['S' if i == 1 else 'W' for i in l])
		print(s)
		exit()
print(-1)


n = int(input())
s = input()
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
	elif 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
	elif 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 = list(map(int, input().replace('o', '0').replace('x', '1')))
for p in [[0, 0], [0, 1], [1, 0], [1, 1]]:
	for s in S[1:]:
		if p[-1] ^ p[-2] ^ s == 1:
			p.append(1)
		else:
			p.append(0)
	if p[0] == p[-1] and p[-2] ^ p[-3] ^ p[0] ^ S[-1] == 0 and (p[0] ^ p[-2] ^ p[1] ^ S[0] == 0):
		print(''.join(map(str, p[:-1])).replace('0', 'S').replace('1', 'W'))
		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]
	elif 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])
			elif temp1[i - 1] == 'S':
				temp1.append('W')
			else:
				temp1.append('S')
		elif temp1[i] == 'W':
			temp1.append(temp1[i - 1])
		elif 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]))
		exit()
print(-1)


import sys

def I():
	return int(sys.stdin.readline().rstrip())

def LS2():
	return list(sys.stdin.readline().rstrip())
N = I()
s = LS2()
for i in range(N):
	if s[i] == 'o':
		s[i] = 0
	else:
		s[i] = 1
for (a, b) in [(0, 0), (0, 1), (1, 0), (1, 1)]:
	A = [0] * N
	A[0] = a
	A[1] = b
	for i in range(2, N):
		A[i] = A[i - 2] ^ A[i - 1] ^ s[i - 1]
	if A[0] == A[-2] ^ A[-1] ^ s[-1] and A[1] == A[-1] ^ A[0] ^ s[0]:
		A = ['S' if A[i] == 0 else 'W' for i in range(N)]
		print(''.join(A))
		exit()
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)


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()


N = int(input())
slist = [x == 'o' for x in input()]
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]
		elif 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
			elif answer_list[l] == answer_list[r]:
				contra = True
		elif slist[i]:
			if answer_list[l] == answer_list[r]:
				contra = True
		elif 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)


import bisect
import collections
import copy
import functools
import heapq
import math
import sys
from collections import deque
from collections import defaultdict
input = sys.stdin.readline
MOD = 10 ** 9 + 7
N = int(input())
s = list(input().rstrip())
s.append(s[0])
a = [-1] * (N + 2)

def d(self, f, ans):
	if ans == 'o':
		return (self + f) % 2
	else:
		return (self + f + 1) % 2
flag = 0
for p in [(0, 0), (0, 1), (1, 0), (1, 1)]:
	(a[0], a[1]) = p
	for i in range(1, N + 1):
		a[i + 1] = d(a[i], a[i - 1], s[i])
	if a[0] == a[N] and a[1] == a[N + 1]:
		break
else:
	flag = -1
if flag == -1:
	print(-1)
else:
	ans = [None] * N
	for i in range(N):
		if a[i] == 0:
			ans[i] = 'S'
		else:
			ans[i] = 'W'
	output = ''.join(ans)
	print(output)


n = int(input())
s = input()
a = ['SS', 'WS', 'SW', 'WW']

def f(a, b, w):
	if w == 'o':
		if a == 'S' and b == 'S':
			return 'S'
		elif a == 'W' and b == 'S':
			return 'W'
		elif a == 'S' and b == 'W':
			return 'W'
		else:
			return 'S'
	elif a == 'S' and b == 'S':
		return 'W'
	elif a == 'W' and b == 'S':
		return 'S'
	elif a == 'S' and b == 'W':
		return 'S'
	else:
		return 'W'
for i in range(n):
	for j in range(4):
		a[j] += f(a[j][i], a[j][i + 1], s[i])
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])
		exit()
print(-1)


N = int(input())
S = input()
f = lambda x, y, z: 'WS'[(x == 'S') ^ (y == 'S') ^ (z == 'o')]
for T in ['SS', 'SW', 'WS', 'WW']:
	for s in S:
		T += f(T[-1], T[-2], s)
	if T[:2] == T[-2:]:
		print(T[1:-1])
		break
else:
	print(-1)


N = int(input())
s = input()
g = 0

def ki(a, b):
	global g
	l = [None] * N
	(l[-2], l[-1]) = (a, b)
	for i in range(-1, N - 1):
		if l[i - 1] == l[i] and s[i] == 'o':
			l[i + 1] = 0
		elif l[i - 1] != l[i] and s[i] == 'x':
			l[i + 1] = 0
		else:
			l[i + 1] = 1
	if l[-2] == a and l[-1] == b and (g == 0):
		g = 1
		for i in l:
			print('W' if i else 'S', end='')
ki(0, 0)
ki(0, 1)
ki(1, 0)
ki(1, 1)
if not g:
	print(-1)


import sys
N = int(input())
S = input()
flgT = ['SSS', 'SWW', 'WWS', 'WSW']
flgF = ['SSW', 'WSS', 'SWS', 'WWW']
if S[0] == 'o':
	for i in range(4):
		str = flgT[i]
		for j in range(1, N):
			if S[j] == 'o' and str[-1] == 'S' or (S[j] == 'x' and str[-1] == 'W'):
				str = str + str[-2]
			elif str[-2] == 'W':
				str = str + 'S'
			else:
				str = str + 'W'
		if str[-2] == str[0] and str[-1] == str[1]:
			str = str[1:-1]
			print(str)
			sys.exit()
else:
	for i in range(4):
		str = flgF[i]
		for j in range(1, N):
			if S[j] == 'o' and str[-1] == 'S' or (S[j] == 'x' and str[-1] == 'W'):
				str = str + str[-2]
			elif str[-2] == 'W':
				str = str + 'S'
			else:
				str = str + 'W'
		if str[-2] == str[0] and str[-1] == str[1]:
			str = str[1:-1]
			print(str)
			sys.exit()
print(-1)


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

def check(a0, a1):
	(b0, b1) = (a0, a1)
	A = a1
	for i in range(N):
		if a1 == 'S':
			if S[i] == 'o':
				a2 = a0
			else:
				a2 = B[a0]
		elif S[i] == 'o':
			a2 = B[a0]
		else:
			a2 = a0
		A += a2
		(a0, a1) = (a1, a2)
	if A[0] == A[N] and A[0] == b1 and (A[N - 1] == b0):
		return A[0:N]
	else:
		return -1
Ans = []
Ans.append(check('S', 'S'))
Ans.append(check('S', 'W'))
Ans.append(check('W', 'S'))
Ans.append(check('W', 'W'))
for ans in Ans:
	if ans == -1:
		continue
	else:
		print(ans)
		exit()
else:
	print(-1)


import sys

def main():
	N = int(input())
	s = list(input())
	s.append(s[0])
	s.insert(0, s[-2])
	init = ((0, 0), (0, 1), (1, 0), (1, 1))
	for i in init:
		p = [0] * (N + 2)
		p[0] = i[0]
		p[1] = i[1]
		for j in range(1, N + 1):
			if s[j] == 'o':
				if p[j] == 0:
					p[j + 1] = p[j - 1] ^ 0
				else:
					p[j + 1] = p[j - 1] ^ 1
			elif p[j] == 0:
				p[j + 1] = p[j - 1] ^ 1
			else:
				p[j + 1] = p[j - 1] ^ 0
		if p[0] == p[-2] and p[1] == p[-1]:
			ss = list(map(lambda x: 'W' if x == 1 else 'S', p[1:N + 1]))
			print(''.join(ss))
			sys.exit()
	else:
		print(-1)
main()


N = int(input())
s = input()
inv = {'S': 'W', 'W': 'S'}
prefix = ['SS', 'SW', 'WS', 'WW']

def check_i(i):
	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()
S = [1 if S[i] == 'o' else -1 for i in range(N)]
tmp = [0] * N
tmp[0] = 1
if S[0] == 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
	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:
	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
	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
tmp = [0] * N
tmp[0] = -1
if S[0] == -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
	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:
	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
	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)


from itertools import product as prod
n = int(input())
ss = list(input())

def next_anim(a_0, a_1, s):
	if s == 'o':
		if a_1 == 'S':
			return a_0
		else:
			return 'W' if a_0 == 'S' else 'S'
	elif a_1 == 'S':
		return 'W' if a_0 == 'S' else 'S'
	else:
		return a_0
ans = -1
anims = ['' for _ in range(n)]
for (fst, snd) in prod(['W', 'S'], repeat=2):
	anims[:2] = [fst, snd]
	for i in range(2, n):
		anims[i] = next_anim(anims[i - 2], anims[i - 1], ss[i - 1])
	tmp_anim = next_anim(snd, fst, ss[0])
	tmp_anim2 = next_anim(anims[-2], anims[-1], ss[-1])
	if tmp_anim == anims[-1] and tmp_anim2 == anims[0]:
		ans = ''.join(anims)
		break
print(ans)


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]
			elif ss[i - 1] == 'W':
				ss += 'S'
			else:
				ss += 'W'
		elif 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
		elif 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()
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'
		elif 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]
		elif 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]
		elif S[-1] == 'x':
			g = t[-2] == t[0]
		else:
			g = t[-2] != t[0]
	if f and g:
		print(t)
		return
print(-1)


def check():
	N = int(input())
	S = input()
	S = S[1:] + S[0]
	animal = ['W', 'S']
	for a in animal:
		for b in animal:
			(pre, nex) = (a, b)
			answer = [a, b]
			for i in range(N):
				if nex == 'S' and S[i] == 'o' or (nex == 'W' and S[i] == 'x'):
					tmp = nex
					nex = pre
					pre = tmp
					answer.append(nex)
				else:
					tmp = nex
					nex = 'W' if pre == 'S' else 'S'
					pre = tmp
					answer.append(nex)
			if nex == b and pre == a:
				return answer[:-2]
	else:
		return -1
ans = check()
if type(ans) == int:
	print(ans)
else:
	print(''.join(ans))


import sys
input = sys.stdin.readline
N = int(input())
s = input().rstrip()
start = ['WS', 'WW', 'SS', 'SW']
for A in start:
	A = list(A)
	for i in range(1, N):
		if A[i] == 'W' and s[i] == 'o' or (A[i] == 'S' and s[i] == 'x'):
			if A[i - 1] == 'S':
				A.append('W')
			else:
				A.append('S')
		else:
			A.append(A[i - 1])
	if len(A) == N + 1 and A[0] == A[-1]:
		A = A[:N]
		if A[0] == 'W' and s[0] == 'o' or (A[0] == 'S' and s[0] == 'x'):
			if A[1] != A[-1]:
				print(''.join(A))
				sys.exit()
		elif A[-1] == A[1]:
			print(''.join(A))
			sys.exit()
print(-1)


import itertools
N = int(input())
slist = [x == 'o' for x in input()]
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)


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]
			elif 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()


import sys

def calc(s, x, i):
	if s[i] == 'S':
		if x == 'o':
			return s[i - 1]
		elif s[i - 1] == 'S':
			return 'W'
		else:
			return 'S'
	elif x == 'x':
		return s[i - 1]
	elif s[i - 1] == 'S':
		return 'W'
	else:
		return 'S'
n = int(input())
s = input()
for s1 in ['S', 'W']:
	for sn in ['S', 'W']:
		ans = [s1] + [''] * (n - 2) + [sn]
		for i in range(n - 1):
			ans[i + 1] = calc(ans, s[i], i)
		zn = calc(ans, s[-2], n - 2)
		z1 = calc(ans, s[-1], n - 1)
		if zn == sn and z1 == s1:
			print(''.join(ans))
			sys.exit()
print(-1)


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

def check(ans):
	for i in range(1, N - 1):
		if (ans[i] == 0) == (S[i] == 'o'):
			ans += [ans[i - 1]]
		else:
			ans += [1 - ans[i - 1]]
	if ((S[0] == 'o') == (ans[0] == 0)) != (ans[1] == ans[-1]):
		return
	if ((S[-1] == 'o') == (ans[-1] == 0)) != (ans[-2] == ans[0]):
		return
	print(*['W' if _ else 'S' for _ in ans], sep='')
	exit()
check([0, 0])
check([0, 1])
check([1, 0])
check([1, 1])
print(-1)


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

def make_arr(first, second):
	result = [first, second]
	(last, prev) = (second, first)
	for ox in s[1:] + s[0]:
		if (ox == 'o') ^ (last == 0):
			(last, prev) = (1 - prev, last)
		else:
			(last, prev) = (prev, last)
		result.append(last)
		continue
	bl = result[0] == result[-2] and result[1] == result[-1]
	return (bl, result[:-2])
answer = '-1'
for (fi, se) in [[0, 0], [0, 1], [1, 0], [1, 1]]:
	(bl, li) = make_arr(fi, se)
	if bl:
		answer = ''.join(['W' if x else 'S' for x in li])
print(answer)


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'
			elif 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]
		elif 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]
		elif 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 = [0 + (m == 'o') for m in input()]

def nxt(a, b, m):
	if a == b:
		return m
	else:
		return 1 - m
for (a, b) in ((1, 1), (0, 1), (1, 0), (0, 0)):
	(c, d) = (a, b)
	ans = [a, b]
	for i in range(n - 2):
		(a, b) = (b, nxt(a, b, s[i + 1]))
		ans.append(b)
	if nxt(a, b, s[-1]) == c and nxt(b, c, s[0]) == d:
		for x in ans:
			if x:
				print('S', end='')
			else:
				print('W', end='')
		exit()
print(-1)


(n, s) = open(0)
n = int(n)
for (a, b) in ([0, 0], [0, 1], [1, 0], [1, 1]):
	r = [a, b]
	for i in range(n):
		(a, b) = (b, s[-~i % n] == 'xo'[a == b])
		r += [b]
	if r[:2] == r[-2:]:
		print(*('WS'[i] for i in r[:-2]), sep='')
		exit()
print(-1)


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]
		elif x[i - 2] == 'S':
			x[i] = 'W'
		else:
			x[i] = 'S'
	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)


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 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])
			elif 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]:
							f = False
					elif not stress[-1] != stress[i + 1]:
						f = False
				elif i == N - 1:
					if s[i] == 'o':
						if not stress[i - 1] == stress[0]:
							f = False
					elif not stress[i - 1] != stress[0]:
						f = False
				elif s[i] == 'o':
					if not stress[i - 1] == stress[i + 1]:
						f = False
				elif not stress[i - 1] != stress[i + 1]:
					f = False
			elif i == 0:
				if s[i] == 'o':
					if not stress[-1] != stress[i + 1]:
						f = False
				elif not stress[-1] == stress[i + 1]:
					f = False
			elif i == N - 1:
				if s[i] == 'o':
					if not stress[i - 1] != stress[0]:
						f = False
				elif not stress[i - 1] == stress[0]:
					f = False
			elif s[i] == 'o':
				if not stress[i - 1] != stress[i + 1]:
					f = False
			elif not stress[i - 1] == stress[i + 1]:
				f = False
		if f:
			return ''.join((str(x) for x in ans))
	return -1
print(main())


N = int(input())
s = input()
for bit in range(4):
	animal = [-1] * N
	animal[0] = bit % 2
	animal[1] = bit // 2
	for i in range(1, N - 1):
		if (animal[i] == 0) ^ (s[i] == 'o'):
			animal[i + 1] = 1 - animal[i - 1]
		else:
			animal[i + 1] = animal[i - 1]
	ok = True
	if animal[-1] == 0:
		if (s[-1] == 'o') ^ (animal[-2] == animal[0]):
			ok = False
	if animal[-1] == 1:
		if (s[-1] == 'o') ^ (animal[-2] != animal[0]):
			ok = False
	if animal[0] == 0:
		if (s[0] == 'o') ^ (animal[-1] == animal[1]):
			ok = False
	if animal[0] == 1:
		if (s[0] == 'o') ^ (animal[-1] != animal[1]):
			ok = False
	if ok:
		ans = ''
		for i in range(N):
			ans += 'S' if animal[i] == 0 else 'W'
		print(ans)
		exit()
print(-1)


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
		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()


def check(prev_, now_, S, N):
	rev = {'S': 'W', 'W': 'S'}
	(prev, now) = (prev_, now_)
	p = [now]
	for i in range(1, N + 1):
		if S[i] == 'o':
			if now == 'S':
				(prev, now) = (now, prev)
			else:
				(prev, now) = (now, rev[prev])
		elif now == 'S':
			(prev, now) = (now, rev[prev])
		else:
			(prev, now) = (now, prev)
		p.append(now)
	if prev_ == prev and now_ == now:
		print(''.join(p[:-1]))
	return prev_ == prev and now_ == now
N = int(input())
S = input()
S = S[-1] + S + S[0]
ptn = ['SS', 'SW', 'WS', 'WW']
for sw in ptn:
	if check(sw[0], sw[1], S, N):
		break
else:
	print(-1)


import sys
import itertools
INF = float('inf')
MOD = 10 ** 9 + 7

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def II():
	return int(sys.stdin.readline())

def SI():
	return input()
n = II()
S = [c == 'o' for c in SI()]
S += S[:2]
SW = {'S': 'W', 'W': 'S'}
for (a1, a2) in itertools.product('SW', repeat=2):
	M = [a1, a2]
	for i in range(n):
		if S[i + 1]:
			M.append(M[-2] if M[-1] == 'S' else SW[M[-2]])
		else:
			M.append(M[-2] if M[-1] == 'W' else SW[M[-2]])
	if M[0] == M[-2] and M[1] == M[-1]:
		print(*M[:-2], sep='')
		exit()
print(-1)


import math
n = int(input())
s = input()
m = {'S': {'S': {'o': 'S', 'x': 'W'}, 'W': {'o': 'W', 'x': 'S'}}, 'W': {'S': {'o': 'W', 'x': 'S'}, 'W': {'o': 'S', 'x': 'W'}}}
import itertools
for (p, c) in itertools.product(['S', 'W'], ['S', 'W']):
	ans = [p, c]
	for a in s:
		(p, c) = (c, m[p][c][a])
		ans.append(c)
	if ans[:2] == ans[-2:]:
		print(''.join(ans[1:-1]))
		exit(0)
print(-1)


def check(s, ans, i):
	return s[i - 1] ^ ans[i - 1] ^ ans[i - 2] ^ ans[i]

def solve(first, second, s):
	n = len(s)
	ans = [0] * n
	ans[-2] = first
	ans[-1] = second
	for i in range(0, n - 2):
		nsame = 0
		nsame ^= s[i - 1]
		nsame ^= ans[i - 1]
		ans[i] = ans[i - 2] ^ nsame
	if check(s, ans, n - 2) == 0 and check(s, ans, n - 1) == 0:
		ans.append(1)
	return ans
N = int(input())
s = input()
data = [0] * N
for i in range(N):
	data[i] = 1 if s[i] == 'x' else 0
ok = 0
for i in range(2):
	if ok == 1:
		break
	for j in range(2):
		if ok == 1:
			break
		ans = solve(i, j, data)
		ok = len(ans) - N
if ok == 0:
	print('-1')
else:
	for i in range(N):
		print('W' if ans[i] == 1 else 'S', end='')
	print()


N = int(input())
D = {True: 'S', False: 'W'}
E = {'o': True, 'x': False}
S = list(input())
for i in range(N):
	S[i] = E[S[i]]
L = {(True, True), (True, False), (False, True), (False, False)}
for (a, b) in L:
	ans = [None] * N
	(ans[0], ans[1]) = (a, b)
	for i in range(1, N - 1):
		if not ans[i] ^ S[i]:
			ans[i + 1] = ans[i - 1]
		else:
			ans[i + 1] = not ans[i - 1]
	if ans[-1] ^ S[-1] == ans[-2] ^ ans[0] and ans[0] ^ S[0] == ans[-1] ^ ans[1]:
		for i in range(N):
			ans[i] = D[ans[i]]
		print(''.join(ans))
		exit()
else:
	print(-1)


import sys
n = int(input())
s = list(input())
for i in range(n):
	if s[i] == 'o':
		s[i] = 0
	else:
		s[i] = 1
s.append(s[0])
data = ['11', '10', '01', '00']
anser = ''
for ans in data:
	qqq = ans
	for i in range(1, n + 1):
		if ans[i] == '1':
			ans += str((int(ans[i - 1]) + s[i]) % 2)
		else:
			ans += str((int(ans[i - 1]) + s[i] + 1) % 2)
	if ans[n:] == qqq:
		anser = ans[:n]
		break
else:
	print(-1)
	sys.exit()
anser = list(anser)
for i in range(n):
	if anser[i] == '1':
		anser[i] = 'S'
	else:
		anser[i] = 'W'
print(''.join(anser))


n = int(input())
s = list(input())
ss = [1, 1]
sw = [1, -1]
ws = [-1, 1]
ww = [-1, -1]
ans = []
for i in range(1, n):
	flag = 1
	if s[i] == 'x':
		flag = -1
	if ss[i] == 1:
		ss.append(flag * ss[i - 1])
	else:
		ss.append(flag * -ss[i - 1])
	if sw[i] == 1:
		sw.append(flag * sw[i - 1])
	else:
		sw.append(flag * -sw[i - 1])
	if ws[i] == 1:
		ws.append(flag * ws[i - 1])
	else:
		ws.append(flag * -ws[i - 1])
	if ww[i] == 1:
		ww.append(flag * ww[i - 1])
	else:
		ww.append(flag * -ww[i - 1])
flag = 1
if s[0] == 'x':
	flag = -1
if ss[0] == ss[-1] and ss[1] == ss[0] * flag * ss[-2]:
	ans = ss
elif sw[0] == sw[-1] and sw[1] == sw[0] * flag * sw[-2]:
	ans = sw
elif ws[0] == ws[-1] and ws[1] == ws[0] * flag * ws[-2]:
	ans = ws
elif ww[0] == ww[-1] and ww[1] == ww[0] * flag * ww[-2]:
	ans = ww
if ans == []:
	print(-1)
else:
	ans = ans[:n]
	ans = ['S' if i == 1 else 'W' for i in ans]
	print(''.join(ans))


import sys
input = sys.stdin.readline
n = int(input())
s = input()

def solve():
	for i in range(1, n):
		if ans[i] == 'S' and s[i] == 'o' or (ans[i] == 'W' and s[i] == 'x'):
			ans[i + 1] = ans[i - 1]
		elif ans[i - 1] == 'S':
			ans[i + 1] = 'W'
		else:
			ans[i + 1] = 'S'
		if ans[0] == 'S' and s[0] == 'o' or (ans[0] == 'W' and s[0] == 'x'):
			sl = ans[1]
		elif ans[1] == 'S':
			sl = 'W'
		else:
			sl = 'S'
	if ans[0] == ans[-1] and sl == ans[n - 1]:
		return True
	else:
		return False
ans = [0] * (n + 1)
for i in ['S', 'W']:
	for j in ['S', 'W']:
		ans[0] = i
		ans[1] = j
		if solve():
			print(''.join(ans[:-1]))
			exit()
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'
				elif 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
			elif 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
			elif 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()


import sys
n = int(input())
s = input()
array = [[True, True], [True, False], [False, False], [False, True]]
for i in range(1, n):
	for v in array:
		flag = (s[i] == 'o') == v[i]
		v.append(flag == v[i - 1])
for v in array:
	flag1 = v[1] == v[-2]
	flag2 = (s[0] == 'o') == v[0]
	flag = flag1 == flag2
	if v[0] == v[-1] and flag:
		for c in v[0:len(v) - 1]:
			if c:
				print('S', end='')
			else:
				print('W', end='')
		print()
		sys.exit(0)
print(-1)


n = int(input())
s = input()
w = {-1: 'W', 1: 'S'}
p = {1: 'o', -1: 'x'}
for tmp in [[1, 1], [-1, -1], [1, -1], [-1, 1]]:
	for i in range(1, n):
		tmp.append(tmp[i - 1] if s[i] == p[tmp[i]] else tmp[i - 1] * -1)
	if tmp[0] == tmp[-1]:
		flag = 1 if s[0] == p[tmp[0]] else -1
		if tmp[-2] == tmp[1] * flag:
			tmp.pop()
			print(''.join(map(w.get, tmp)))
			break
else:
	print(-1)


(n, s) = (int(input()), input())
s += s[:2]
for i in range(2):
	for j in range(2):
		a = [0] * (n + 2)
		a[0] = i
		a[1] = j
		for k in range(1, n + 1):
			if a[k] == 0:
				if s[k] == 'o':
					a[k + 1] = a[k - 1]
				else:
					a[k + 1] = not a[k - 1]
			elif s[k] == 'o':
				a[k + 1] = not a[k - 1]
			else:
				a[k + 1] = a[k - 1]
		if a[0] == a[n] and a[1] == a[n + 1]:
			print(*['W' if k else 'S' for k in a[:n]], sep='')
			exit()
print(-1)


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()
for (t0, t1) in ('SS', 'SW', 'WS', 'WW'):
	t = [''] * N
	t[0] = t0
	t[1] = t1
	for i in range(2, N):
		if t[i - 2] == t[i - 1]:
			t[i] = 'S' if s[i - 1] == 'o' else 'W'
		else:
			t[i] = 'W' if s[i - 1] == 'o' else 'S'
	if t[-2] == t[-1]:
		if t[0] != ('S' if s[-1] == 'o' else 'W'):
			continue
	elif t[0] != ('W' if s[-1] == 'o' else 'S'):
		continue
	if t[-1] == t[0]:
		if t[1] != ('S' if s[0] == 'o' else 'W'):
			continue
	elif t[1] != ('W' if s[0] == 'o' else 'S'):
		continue
	print(''.join(t))
	exit()
print(-1)


N = int(input())
S = input()
ANS = -1

def check(s, a, b, c):
	if s == 'o':
		if b == 'S' and a == c:
			return True
		elif b == 'W' and a != c:
			return True
	elif b == 'S' and a != c:
		return True
	elif b == 'W' and a == c:
		return True
	return False
for start in ['SS', 'SW', 'WS', 'WW']:
	ans = start
	for i in range(2, N):
		if S[i - 1] == 'o':
			if ans[i - 2] == ans[i - 1]:
				ans += 'S'
			else:
				ans += 'W'
		elif ans[i - 2] == ans[i - 1]:
			ans += 'W'
		else:
			ans += 'S'
	if check(S[0], ans[N - 1], ans[0], ans[1]) and check(S[N - 1], ans[N - 2], ans[N - 1], ans[0]):
		ANS = ans
		break
print(ANS)


n = int(input())
s = input()
for i in range(4):
	a = [i % 2, i // 2] + [1] * n
	for i in range(2, n + 2):
		a[i] ^= a[i - 2] ^ a[i - 1] ^ (s[(i - 1) % n] == 'o')
	if a[:2] == a[-2:]:
		for i in range(n):
			print('SW'[a[i]], end='')
		exit()
print(-1)


n = int(input())
s = input()
s = s + s[0]
inv = {'S': 'W', 'W': 'S'}
for (zero, one) in [['S', 'S'], ['S', 'W'], ['W', 'S'], ['W', 'W']]:
	animals = [zero, one]
	for i in range(2, n + 2):
		if animals[i - 1] == 'S':
			if s[i - 1] == 'o':
				animals.append(animals[i - 2])
			else:
				animals.append(inv[animals[i - 2]])
		elif s[i - 1] == 'o':
			animals.append(inv[animals[i - 2]])
		else:
			animals.append(animals[i - 2])
	if animals[0] == animals[n] and animals[1] == animals[n + 1]:
		print(''.join(animals[0:n]))
		exit(0)
print(-1)


from collections import defaultdict

def ok(l, s):
	for i in range(len(s) * 2):
		now = i % len(l)
		pre = now - 1
		nex = (now + 1) % len(l)
		if l[now] == -1 and s[now] == 'x' or (l[now] == 1 and s[now] == 'o'):
			if l[nex] is None:
				l[nex] = l[pre]
			elif l[nex] != l[pre]:
				return False
		elif l[nex] is None:
			l[nex] = -1 * l[pre]
		elif l[nex] != -1 * l[pre]:
			return False
	return True

def main():
	N = int(input())
	s = input()
	for x in [(-1, -1), (-1, 1), (1, -1), (1, 1)]:
		l = [None] * N
		(l[-1], l[0]) = (x[0], x[1])
		if ok(l, s):
			print(''.join(['W' if x == -1 else 'S' for x in l]))
			return
	print(-1)
main()


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])
		exit()
print(-1)


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]
			elif 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]
			elif 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()

def search(t0, t1):
	t = [t0, t1]
	for i in range(1, n + 1):
		if t[i] == 'S':
			if s[i % n] == 'o':
				t.append(t[i - 1])
			elif t[i - 1] == 'S':
				t.append('W')
			else:
				t.append('S')
		elif s[i % n] == 'o':
			if t[i - 1] == 'S':
				t.append('W')
			else:
				t.append('S')
		else:
			t.append(t[i - 1])
	if t[0] == t[-2] and t[1] == t[-1]:
		return t[:-2]
	else:
		return None
flg = True
for (i, j) in [('W', 'W'), ('S', 'S'), ('S', 'W'), ('W', 'S')]:
	if not search(i, j) is None:
		ans = search(i, j)
		print(*ans, sep='')
		flg = False
		break
if flg:
	print(-1)


def swap(w):
	return 'S' if w == 'W' else 'W'
N = int(input())
s = input()
inits = ['SS', 'SW', 'WS', 'WW']
for init in inits:
	ans = init
	for i in range(1, N):
		if ans[i] == 'S':
			if s[i] == 'o':
				ans = ans + ans[i - 1]
			else:
				ans = ans + swap(ans[i - 1])
		elif s[i] == 'o':
			ans = ans + swap(ans[i - 1])
		else:
			ans = ans + ans[i - 1]
	if ans[0] == ans[-1]:
		ans = ans[0:N]
		if ans[0] == 'S':
			if s[0] == 'o':
				val = ans[1] == ans[-1]
			else:
				val = ans[1] != ans[-1]
		elif s[0] == 'o':
			val = ans[1] != ans[-1]
		else:
			val = ans[1] == ans[-1]
		if val:
			break
	ans = '-1'
print(ans)


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

def fnc(x1, x2):
	pre = x1
	curr = x2
	ans = []
	for i in range(N):
		if curr == 1:
			if s[i] == 'o':
				nv = pre
			else:
				nv = (pre + 1) % 2
		elif s[i] == 'x':
			nv = pre
		else:
			nv = (pre + 1) % 2
		pre = curr
		curr = nv
		ans.append(pre)
	if pre == x1 and curr == x2:
		return ans
	else:
		return None

def solve():
	for i in [1, 0]:
		for j in [1, 0]:
			ans = fnc(i, j)
			if ans:
				return ans
	return None
ans = solve()
if not ans:
	print(-1)
	exit()
for a in ans:
	print('S' if a else 'W', end='')
print()


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

def next(p, c, s):
	if p == 'S' and c == 'S':
		return 'S' if s == 'o' else 'W'
	elif p == 'S' and c == 'W':
		return 'W' if s == 'o' else 'S'
	elif p == 'W' and c == 'S':
		return 'W' if s == 'o' else 'S'
	elif p == 'W' and c == 'W':
		return 'S' if s == 'o' else 'W'
	else:
		return None
flag = False
for (p, c) in [('S', 'S'), ('S', 'W'), ('W', 'S'), ('W', 'W')]:
	r = p + c
	for i in range(1, N - 1):
		r += next(r[-2], r[-1], s[i])
	if next(r[-2], r[-1], s[N - 1]) == r[0] and next(r[-1], r[0], s[0]) == r[1]:
		flag = True
		print(r)
		break
if not flag:
	print(-1)


n = int(input())
a = input()
s = 'SW'
for d in range(2):
	for c in range(2):
		k = s[d] + s[c]
		for i in range(2, n + 2):
			if k[i - 1] == 'S':
				if a[(i - 1) % n] == 'o':
					k += k[i - 2]
				else:
					k += 'W' if k[i - 2] == 'S' else 'S'
			elif a[(i - 1) % n] == 'o':
				k += 'W' if k[i - 2] == 'S' else 'S'
			else:
				k += k[i - 2]
		else:
			if k[0] == k[-2] and k[1] == k[-1]:
				print(k[:-2])
				exit()
else:
	print(-1)


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

def makeans(ans):
	for c in s:
		if (ans[-1] == 'S') ^ (c == 'o') ^ (ans[-2] == 'W'):
			ans += 'W'
		else:
			ans += 'S'
	return ans
for initial in ['SS', 'SW', 'WS', 'WW']:
	ans = makeans(initial)
	if ans[0] == ans[-2] and ans[1] == ans[-1]:
		print(ans[1:-1])
		exit()
print('-1')


n = int(input())
s = input()
l = s[n - 1] + s + s[0]
assign = ['S', 'W']
for i in assign:
	for j in assign:
		t = i + j
		for k in range(2, n):
			if s[k - 1] == 'o':
				if t[-1] == 'S':
					t += t[-2]
				elif t[-2] == 'S':
					t += 'W'
				else:
					t += 'S'
			elif t[-1] == 'S':
				if t[-2] == 'S':
					t += 'W'
				else:
					t += 'S'
			else:
				t += t[-2]
		t = t[n - 1] + t + t[0]
		ok = True
		for u in range(1, n + 1):
			if l[u] == 'o':
				if t[u] == 'S':
					if t[u - 1] != t[u + 1]:
						ok = False
				elif t[u - 1] == t[u + 1]:
					ok = False
			elif t[u] == 'S':
				if t[u - 1] == t[u + 1]:
					ok = False
			elif t[u - 1] != t[u + 1]:
				ok = False
		if ok:
			print(t[1:n + 1])
			exit()
print(-1)


n = int(input())
s = input()
s = s + s[0]
for (a, b) in [(0, 0), (0, 1), (1, 0), (1, 1)]:
	ans = [a, b] + [1] * n
	for i in range(2, n + 2):
		ans[i] ^= ans[i - 2] ^ ans[i - 1] ^ (s[i - 1] == 'o')
	if ans[:2] == ans[-2:]:
		for i in range(n):
			print('SW'[ans[i]], end='')
		break
else:
	print(-1)


def solve():
	n = int(input())
	s = [c == 'o' for c in input()]
	for (a, b) in ([0, 0], [0, 1], [1, 0], [1, 1]):
		r = [a, b]
		for i in range(n):
			(a, b) = (b, s[-~i % n] == (a == b))
			r += [b]
		if r[:2] == r[-2:]:
			print(''.join(('WS'[i] for i in r[:-2])), sep='')
			exit()
	print(-1)
solve()


N = int(input())
S = input()
for p in ('SS', 'SW', 'WS', 'WW'):
	ans = p[1]
	ip = p
	for i in range(N):
		if S[i] == 'o':
			if p[0] == p[1]:
				p = p[1] + 'S'
			else:
				p = p[1] + 'W'
		elif p[0] == p[1]:
			p = p[1] + 'W'
		else:
			p = p[1] + 'S'
		ans += p[-1]
	if ans[-2:] == ip:
		print(ans[:-1])
		exit()
print(-1)


import itertools
length = int(input())
target = input()
target = [n == 'o' for n in target]
for (before, after) in itertools.product([True, False], repeat=2):
	tmp_answer = [0 for n in range(length)]
	tmp_answer[0] = before
	tmp_answer[1] = after
	for i in range(1, length - 1):
		tmp_answer[i + 1] = before ^ after ^ target[i]
		(before, after) = (after, tmp_answer[i + 1])
	if tmp_answer[length - 2] ^ tmp_answer[length - 1] ^ target[length - 1] == tmp_answer[0] and tmp_answer[length - 1] ^ tmp_answer[0] ^ target[0] == tmp_answer[1]:
		print(''.join(['S' if n else 'W' for n in tmp_answer]))
		break
else:
	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'
			elif ans[j] == 'S':
				ans += 'W'
			else:
				ans += 'S'
		elif s[j + 1] == 'o':
			if ans[j] == 'S':
				ans += 'W'
			else:
				ans += 'S'
		elif 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
		elif ans[n - 2] == ans[0]:
			flag = False
	elif s[n - 1] == 'o':
		if ans[n - 2] == ans[0]:
			flag = False
	elif ans[n - 2] != ans[0]:
		flag = False
	if ans[0] == 'S':
		if s[0] == 'o':
			if ans[n - 1] != ans[1]:
				flag = False
		elif ans[n - 1] == ans[1]:
			flag = False
	elif s[0] == 'o':
		if ans[n - 1] == ans[1]:
			flag = False
	elif ans[n - 1] != ans[1]:
		flag = False
	if flag == True:
		print(ans)
		break
	else:
		continue
else:
	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]
		elif X[i - 1] == 'S':
			X[i + 1] = 'W'
		else:
			X[i + 1] = 'S'
	elif S[i] == 'x':
		X[i + 1] = X[i - 1]
	elif 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]
		elif X[i - 1] == 'S':
			X[i + 1] = 'W'
		else:
			X[i + 1] = 'S'
	elif S[i] == 'x':
		X[i + 1] = X[i - 1]
	elif 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]
		elif X[i - 1] == 'S':
			X[i + 1] = 'W'
		else:
			X[i + 1] = 'S'
	elif S[i] == 'x':
		X[i + 1] = X[i - 1]
	elif 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]
		elif X[i - 1] == 'S':
			X[i + 1] = 'W'
		else:
			X[i + 1] = 'S'
	elif S[i] == 'x':
		X[i + 1] = X[i - 1]
	elif 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')


def f(n, s, t):
	for i in range(2, n):
		if t[i - 2] == t[i - 1] and s[i - 1] == 'o' or (t[i - 2] != t[i - 1] and s[i - 1] == 'x'):
			t += 'S'
		else:
			t += 'W'
	for i in range(0, 2):
		if t[(i + n - 2) % n] == t[(i + n - 1) % n] and s[(i + n - 1) % n] == 'o' or (t[(i + n - 2) % n] != t[(i + n - 1) % n] and s[(i + n - 1) % n] == 'x'):
			if t[i] != 'S':
				return ':('
		elif t[i] != 'W':
			return ':('
	return t
n = int(input())
s = input()
u = ['SS', 'SW', 'WS', 'WW']
for i in range(4):
	t = f(n, s, u[i])
	if t != ':(':
		print(t)
		exit(0)
print(-1)


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

def judge():
	for comb in (('S', 'S'), ('S', 'W'), ('W', 'S'), ('W', 'W')):
		t = [None] * N
		(t[0], t[1]) = comb
		for i in range(1, N - 1):
			if (s[i] == 'o') == (t[i] == 'S'):
				t[i + 1] = t[i - 1]
			else:
				t[i + 1] = 'S' if t[i - 1] == 'W' else 'W'
		con1 = ((s[0] == 'o') == (t[0] == 'S')) == (t[N - 1] == t[1])
		con2 = ((s[N - 1] == 'o') == (t[N - 1] == 'S')) == (t[N - 2] == t[0])
		if con1 and con2:
			return ''.join(t)
	return -1
print(judge())


def inductive_inference(animal, statement, other):
	if animal == 'S':
		if statement == 'o':
			return other
		else:
			return {'S': 'W', 'W': 'S'}[other]
	elif statement == 'x':
		return other
	else:
		return {'S': 'W', 'W': 'S'}[other]
N = int(input())
S = input()
for (a1, a2) in ['SS', 'SW', 'WS', 'WW']:
	assumption = inductive_inference(a1, S[0], a2)
	(a, b) = (a1, a2)
	animals = [assumption, a, b]
	for c in S[1:]:
		(a, b) = (b, inductive_inference(b, c, a))
		animals.append(b)
	if animals[1] == animals[-1] and animals[0] == animals[N]:
		print(''.join(animals[1:-1]))
		exit()
print(-1)


n = int(input())
s = [c == 'o' for c in input()]

def next_s(s, flag):
	d = {'S': 'W', 'W': 'S'}
	if flag:
		return s
	else:
		return d[s]

def sim(s0):
	ans = ['.' for _ in range(n + 1)]
	ans[0] = s0[0]
	ans[1] = s0[1]
	for i in range(2, n + 1):
		if ans[i - 1] == 'S':
			ans[i] = next_s(ans[i - 2], s[i - 1])
		else:
			ans[i] = next_s(ans[i - 2], not s[i - 1])
	res = ans[1] == ans[-2]
	if s0[0] == 'S':
		if res == s[0] and ans[-1] == ans[0]:
			return ans[:-1]
	elif res != s[0] and ans[-1] == ans[0]:
		return ans[:-1]
	return False

def solve():
	for item in ['SS', 'SW', 'WS', 'WW']:
		ans = sim(item)
		if ans:
			return print(''.join(ans))
	return print(-1)
solve()


N = int(input())
L = input()
L = L.replace('o', '1')
L = L.replace('x', '0')
L = list(map(int, list(L)))
init = [[1, 1], [1, 0], [0, 1], [0, 0]]
ans = -1
for ii in init:
	ret = [None] * N
	ret[0] = ii[1]
	pR = ii[0]
	for i in range(1, N):
		ret[i] = ~(~(ret[i - 1] ^ L[i - 1]) ^ pR)
		pR = ret[i - 1]
	if ii[0] == ret[-1] and ret[0] == ~(~(ret[-1] ^ L[-1]) ^ pR):
		ans = ret
		break
if ans == -1:
	print(ans)
else:
	ans = list(map(str, ans))
	ans = ''.join(ans)
	ans = ans.replace('1', 'S')
	ans = ans.replace('0', 'W')
	print(ans)


options = [(0, 0), (0, 1), (1, 0), (1, 1)]

def judge(n, s):
	res = [None] * n
	for op in options:
		(res[-1], res[0]) = op
		s_num = list(map(lambda a: 0 if a == 'o' else 1, s))
		for i in range(n):
			res[(i + 1) % n] = res[i] ^ s_num[i] ^ res[i - 1]
		if (res[-1], res[0]) == op:
			print(''.join(map(lambda a: 'S' if a == 0 else 'W', res)))
			exit()
n = int(input())
s = input()
judge(n, s)
print(-1)


N = int(input())
s = input()
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 ox_sw(ox, sw, prev):
	if ox == 'o':
		if sw == 1:
			ans = prev
		else:
			ans = -1 * prev
	elif ox == 'x':
		if sw == 1:
			ans = -1 * prev
		else:
			ans = prev
	return ans
n = int(input())
s = input()
a1 = [1, 1]
a2 = [1, -1]
a3 = [-1, 1]
a4 = [-1, -1]
f = False
for a in [a1, a2, a3, a4]:
	for i in range(1, n):
		a.append(ox_sw(s[i], a[i], a[i - 1]))
	if a[n] == a[0] and a[1] == ox_sw(s[0], a[0], a[-2]):
		f = True
		break
if f:
	ans = []
	for i in range(n):
		if a[i] == 1:
			ans.append('S')
		else:
			ans.append('W')
	print(''.join(ans))
else:
	print(-1)


N = int(input())
s = input()
A = ['SS', 'SW', 'WS', 'WW']
for (i, c) in enumerate(s):
	for j in range(4):
		if A[j][-2:] == 'SS':
			if c == 'o':
				A[j] += 'S'
			else:
				A[j] += 'W'
		elif A[j][-2:] == 'SW':
			if c == 'o':
				A[j] += 'W'
			else:
				A[j] += 'S'
		elif A[j][-2:] == 'WS':
			if c == 'o':
				A[j] += 'W'
			else:
				A[j] += 'S'
		elif c == 'o':
			A[j] += 'S'
		else:
			A[j] += 'W'
A = [t[1:-1] for t in A if t[:2] == t[-2:]]
print(A[0] if A else -1)


n = int(input())
s = input().rstrip()
cs = 'SW'
for ss in [[0, 0], [0, 1], [1, 0], [1, 1]]:
	for i in range(1, n + 1):
		if ss[i % n] == 0 and s[i % n] == 'o' or (ss[i % n] == 1 and s[i % n] == 'x'):
			ss.append(ss[i - 1])
		else:
			ss.append(1 - ss[i - 1])
	if ss[-2] == ss[0] and ss[-1] == ss[1]:
		res = ''.join([cs[i] for i in ss[:-2]])
		print(res)
		break
else:
	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 = input()
for (s1, sn) in [('S', 'S'), ('S', 'W'), ('W', 'S'), ('W', 'W')]:
	ans = [''] * (N + 2)
	ans[1] = s1
	ans[0] = sn
	for i in range(1, N + 1):
		if ans[i] == 'S':
			if S[i - 1] == 'o':
				ans[i + 1] = 'S' if ans[i - 1] == 'S' else 'W'
			else:
				ans[i + 1] = 'W' if ans[i - 1] == 'S' else 'S'
		elif S[i - 1] == 'o':
			ans[i + 1] = 'S' if ans[i - 1] == 'W' else 'W'
		else:
			ans[i + 1] = 'W' if ans[i - 1] == 'W' else 'S'
	if ans[0] == ans[N] and ans[1] == ans[N + 1]:
		print(''.join(ans[1:N + 1]))
		exit()
print(-1)


N = int(input())
s = input()
s = list(s)
s.append(s[0])
SW01 = [[0, 0], [0, 1], [1, 0], [1, 1]]
for i in range(4):
	SW = []
	SW.append(SW01[i][0])
	SW.append(SW01[i][1])
	for loc in range(1, N + 1):
		if s[loc] == 'o':
			SW.append(SW[loc - 1] ^ SW[loc])
		else:
			SW.append(SW[loc - 1] ^ (SW[loc] ^ 1))
	if SW[0] == SW[-2] and SW[1] == SW[-1]:
		SW2 = []
		for i in range(N):
			if SW[i] == 0:
				SW2.append('S')
			else:
				SW2.append('W')
		print(''.join(SW2))
		exit()
print(-1)


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

def check_truth(a_0, a_1):
	a = [True for i in range(N)]
	a[0] = a_0
	a[-1] = a_1
	for i in range(N):
		if a[i]:
			if s[i] == 'o':
				a[(i + 1) % N] = a[i - 1]
			else:
				a[(i + 1) % N] = not a[i - 1]
		elif s[i] == 'o':
			a[(i + 1) % N] = not a[i - 1]
		else:
			a[(i + 1) % N] = a[i - 1]
	if a[0] != a_0 or a[-1] != a_1:
		return -1
	else:
		return a
p = [True, False]
for i in range(2):
	for j in range(2):
		ans = check_truth(p[i], p[j])
		if ans != -1:
			for k in range(N):
				if ans[k]:
					print('S', end='')
				else:
					print('W', end='')
			print()
			exit()
print(-1)


N = int(input())
S = str(input())
animal = ['S', 'W']
start = [[0, 0], [0, 1], [1, 0], [1, 1]]
for (i, j) in start:
	ans = [-1] * N
	ans[0] = i
	ans[1] = j
	p = 0
	for k in range(N - 1):
		if p == 0:
			if k == 0:
				if S[k] == 'o':
					if ans[k] == 0:
						ans[-1] = ans[1]
					else:
						ans[-1] = 1 - ans[1]
				elif ans[k] == 0:
					ans[-1] = 1 - ans[1]
				else:
					ans[-1] = ans[1]
			elif 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
			elif 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
	if ans[-1] == 0:
		if S[-1] == 'o':
			if ans[-2] != ans[0]:
				p = 1
		elif ans[-2] == ans[0]:
			p = 1
	elif S[-1] == 'o':
		if ans[-2] == ans[0]:
			p = 1
	elif ans[-2] != ans[0]:
		p = 1
	if p == 0:
		for i in range(N):
			if ans[i] == 0:
				print('S', end='')
			else:
				print('W', end='')
		return
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]
		elif 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
		elif res[-1] != 1 - res[-3]:
			continue
	elif res[-2] == 0:
		if res[-1] != 1 - res[-3]:
			continue
	elif res[-1] != res[-3]:
		continue
	if S[-1] == 'o':
		if res[-1] == 0:
			if res[0] == res[-2]:
				assignable = True
		elif res[0] == 1 - res[-2]:
			assignable = True
	elif res[-1] == 0:
		if res[0] == 1 - res[-2]:
			assignable = True
	elif 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
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 = [1 if a == 'x' else 0 for a in input()]
for (a, b) in ((0, 0), (0, 1), (1, 0), (1, 1)):
	X = [a, b]
	for i in range(N):
		X.append(X[-1] ^ X[-2] ^ S[i])
	if X[-2:] == X[:2]:
		print(''.join(['W' if x else 'S' for x in X[1:-1]]))
		break
else:
	print(-1)


import sys
input = sys.stdin.readline

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]
		elif 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
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 = input()
animals = ['' for _ in range(N)]

def convert(animal):
	if animal == 'S':
		return 'W'
	else:
		return 'S'

def animalOnRight(left, center, sig):
	if center == 'S':
		if sig == 'o':
			return left
		else:
			return convert(left)
	elif sig == 'o':
		return convert(left)
	else:
		return left
for (a0, a1) in [('W', 'S'), ('W', 'W'), ('S', 'S'), ('S', 'W')]:
	(animals[0], animals[1]) = (a0, a1)
	for i in range(N - 2):
		animals[i + 2] = animalOnRight(animals[i], animals[i + 1], s[i + 1])
	satisfied = animalOnRight(animals[N - 2], animals[N - 1], s[N - 1]) == animals[0] and animalOnRight(animals[N - 1], animals[0], s[0]) == animals[1]
	if satisfied:
		for char in animals:
			print(char, end='')
		print()
		exit()
print(-1)


N = int(input())
s = [c == 'x' for c in input()]
ans = [0] * N
end = False
for c0 in (0, 1):
	ans[0] = c0
	for cN in (0, 1):
		ans[-1] = cN
		for (i, c) in enumerate(s[:-2]):
			ans[i + 1] = ans[i - 1] ^ (ans[i] ^ c)
		end = ans[-1] == ans[-3] ^ (ans[-2] ^ s[-2]) and ans[0] == ans[-2] ^ (ans[-1] ^ s[-1])
		if end:
			break
	if end:
		break
if end:
	print(''.join(['SW'[a] for a in ans]))
else:
	print(-1)