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

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

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

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

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

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

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

Difficulty: MEDIUM

Solutions:
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 = [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)


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

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)


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)


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)


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)


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


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)


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


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)


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


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


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)


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)


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)


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


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


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)


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)


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)


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


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


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)


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


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