stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int n;

string s,t;

char change(char c)

{

	if(c=='S')

		return 'W';

	else

		return 'S';

}

bool ok(char a,char x,char y,char b)

{

	if(x=='o'&&y=='S'&&a=='S'&&b=='S')return true;

	if(x=='o'&&y=='S'&&a=='W'&&b=='W')return true;

	if(x=='x'&&y=='S'&&a=='S'&&b=='W')return true;

	if(x=='x'&&y=='S'&&a=='W'&&b=='S')return true;

	if(x=='o'&&y=='W'&&a=='S'&&b=='W')return true;

	if(x=='o'&&y=='W'&&a=='W'&&b=='S')return true;

	if(x=='x'&&y=='W'&&a=='S'&&b=='S')return true;

	if(x=='x'&&y=='W'&&a=='W'&&b=='W')return true; 

	return false;

}

void dfs(int now)

{

	if(now==n-1)

	{

		if(ok(t[n-2],s[n-1],t[n-1],t[0])&&ok(t[n-1],s[0],t[0],t[1]))

		{

			cout<<t<<endl;

			exit(0);

		}

		return;

	}

	int bef=now-1;

	int nxt=now+1;

	if(t[now]=='S')

	{

		if(s[now]=='x')t[nxt]=change(t[bef]);

		else t[nxt]=t[bef];

	}

	else

	{

		if(s[now]=='o')t[nxt]=change(t[bef]);

		else t[nxt]=t[bef];

	}

	dfs(now+1);

}

int main()

{

	cin>>n;

	cin>>s;

	t=s;

	for(int i=0;i<2;i++)

	{

		for(int j=0;j<2;j++)

		{

			t[0]=(i==0?'S':'W');

			t[1]=(j==0?'S':'W');

			dfs(1);

		}

	}

	cout<<"-1\n";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.239740341880056x):
#include <cstdio>

int ans[100005],n;

char a[100005];

int check() {

	for(int i = 1;i <= n;i ++) {

		int l = i - 1,r = i + 1;

		if(l == 0) l = n; 

		if(r == n + 1) r = 1;

		if(ans[i] == 1) {

			if(a[i] == 'o' && ans[l] != ans[r]) return 0;

			if(a[i] == 'x' && ans[l] == ans[r]) return 0;

		}

		else {

			if(a[i] == 'o' && ans[l] == ans[r]) return 0;

			if(a[i] == 'x' && ans[l] != ans[r]) return 0;

		}

	}

	return 1;

}

void init() {

	for(int i = 2;i <= n - 1;i ++) {

		if(ans[i] == 1) {

			if(a[i] == 'o') ans[i + 1] = ans[i - 1];

			if(a[i] == 'x') {

				if(a[i] == 'o') ans[i + 1] = ans[i - 1];

				else ans[i + 1] = (ans[i - 1] == 1?2:1);

			}

		}

		if(ans[i] == 2) {

			if(a[i] == 'x') ans[i + 1] = ans[i - 1];

			if(a[i] == 'o') {

				if(a[i] == 'o') ans[i + 1] = (ans[i - 1] == 1?2:1);

				else ans[i + 1] = ans[i - 1];

			}

		}

	}

}



void print() {

	for(int i = 1;i <= n;i ++) {

		if(ans[i] == 1) printf("S");

		else printf("W");

	}

}

int main() {

	scanf("%d",&n);

	scanf("%s",a + 1);

	ans[1] = ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 1,ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 2,ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	printf("-1\n");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define maxs 220020

#define mme(i,j) memset(i,j,sizeof(i))

#define ll long long

using namespace std;

bool vis[maxs];

char s[maxs];

bool check(int x,int y,int len){

    vis[0]=x;

    vis[1]=y;

    for(int i=2;i<=len+1;i++){

        if(vis[i-1]){

            if(s[i-1]=='o') vis[i]=vis[i-2];

            else vis[i]=!vis[i-2];

        }else{

            if(s[i-1]=='o') vis[i]=!vis[i-2];

            else vis[i]=vis[i-2];

        }

    }

    if(vis[len]==vis[0]&&vis[len+1]==vis[1]){

        for(int i=0;i<len;i++){

            if(vis[i])

                printf("S");

            else

                printf("W");

        }

        puts("");

        return 1;

    }

    return 0;

}



int main()

{

    int n;

    while(~scanf("%d",&n)){

        scanf("%s",s);

        int len=n;

        s[len]=s[0];

        s[len+1]=s[1];

        s[len+2]='\0';

        bool fl=0;

        for(int i=0;i<2;i++){

            for(int j=0;j<2;j++){

                if(check(i,j,len) )

                   {

                       fl=1;

                        break;

                   }

            }

            if(fl) break;

        }

        if(!fl)

            puts("-1");

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.17779795014704x):
#include <cstdio>

int ans[100005],n;

char a[100005];

int check() {

	for(int i = 1;i <= n;i ++) {

		int l = i - 1,r = i + 1;

		if(l == 0) l = n; 

		if(r == n + 1) r = 1;

		if(ans[i] == 1) {

			if(a[i] == 'o' && ans[l] != ans[r]) return 0;

			if(a[i] == 'x' && ans[l] == ans[r]) return 0;

		}

		else {

			if(a[i] == 'o' && ans[l] == ans[r]) return 0;

			if(a[i] == 'x' && ans[l] != ans[r]) return 0;

		}

	}

	return 1;

}

void init() {

	for(int i = 2;i <= n - 1;i ++) {

		if(ans[i] == 1) {

			if(a[i] == 'o') ans[i + 1] = ans[i - 1];

			if(a[i] == 'x') {

				if(a[i] == 'o') ans[i + 1] = ans[i - 1];

				else ans[i + 1] = (ans[i - 1] == 1?2:1);

			}

		}

		if(ans[i] == 2) {

			if(a[i] == 'x') ans[i + 1] = ans[i - 1];

			if(a[i] == 'o') {

				if(a[i] == 'o') ans[i + 1] = (ans[i - 1] == 1?2:1);

				else ans[i + 1] = ans[i - 1];

			}

		}

	}

}



void print() {

	for(int i = 1;i <= n;i ++) {

		if(ans[i] == 1) printf("S");

		else printf("W");

	}

}

int main() {

	scanf("%d",&n);

	scanf("%s",a + 1);

	ans[1] = ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 1,ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 2,ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	printf("-1\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int zz[100005],n;

char dat[100005];



bool check(){

	if(!((dat[0]=='x')==zz[1]^zz[n-1]^zz[0])) return false;

	if(!((dat[n-1]=='x')==zz[n-2]^zz[n-1]^zz[0])) return false;

	return true;

}



int main(){

	scanf("%d%s",&n,dat);

	

	dat[0];

	

	for(int i=0;i<2;i++){

		for(int j=0;j<2;j++){

			zz[1]=i;

			zz[0]=j;

			for(int k=1;k<n-1;k++)

				zz[k+1]=zz[k-1]^zz[k]^(dat[k]=='x');

			if(check()){

				for(int k=0;k<n;k++) printf("%c",zz[k]?'W':'S');

				return 0;

			}

		}

	}

	

	printf("-1\n");

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.173860177882679x):
#include <cstdio>

int ans[100005],n;

char a[100005];

int check() {

	for(int i = 1;i <= n;i ++) {

		int l = i - 1,r = i + 1;

		if(l == 0) l = n; 

		if(r == n + 1) r = 1;

		if(ans[i] == 1) {

			if(a[i] == 'o' && ans[l] != ans[r]) return 0;

			if(a[i] == 'x' && ans[l] == ans[r]) return 0;

		}

		else {

			if(a[i] == 'o' && ans[l] == ans[r]) return 0;

			if(a[i] == 'x' && ans[l] != ans[r]) return 0;

		}

	}

	return 1;

}

void init() {

	for(int i = 2;i <= n - 1;i ++) {

		if(ans[i] == 1) {

			if(a[i] == 'o') ans[i + 1] = ans[i - 1];

			if(a[i] == 'x') {

				if(a[i] == 'o') ans[i + 1] = ans[i - 1];

				else ans[i + 1] = (ans[i - 1] == 1?2:1);

			}

		}

		if(ans[i] == 2) {

			if(a[i] == 'x') ans[i + 1] = ans[i - 1];

			if(a[i] == 'o') {

				if(a[i] == 'o') ans[i + 1] = (ans[i - 1] == 1?2:1);

				else ans[i + 1] = ans[i - 1];

			}

		}

	}

}



void print() {

	for(int i = 1;i <= n;i ++) {

		if(ans[i] == 1) printf("S");

		else printf("W");

	}

}

int main() {

	scanf("%d",&n);

	scanf("%s",a + 1);

	ans[1] = ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 1,ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 2,ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	printf("-1\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

string s;

int n;

bool sp[100000];//0羊,1狼 

bool ok;

int main()

{

	cin>>n>>s;

	for(int f=0;f<2;f++)

	{

		for(int e=0;e<2;e++)

		{

			sp[0]=f;

			sp[1]=e;

			for(int l=2;l<n;l++)

			{

				if(sp[l-1])

				{

					if(s[l-1]=='x')sp[l]=sp[l-2];

					else if(s[l-1]=='o')sp[l]=1^sp[l-2];

				}

				else 

				{

					if(s[l-1]=='x')sp[l]=1^sp[l-2];

					else if(s[l-1]=='o')sp[l]=sp[l-2];

				}

			}

			if(sp[0]==1&&((s[0]=='o'&&sp[n-1]!=sp[1])||(s[0]=='x'&&sp[n-1]==sp[1])))

			{

				if(sp[n-1]==1&&((s[n-1]=='o'&&sp[n-2]!=sp[0])||(s[n-1]=='x'&&sp[n-2]==sp[0])))ok=1;

				else if(sp[n-1]==0&&((s[n-1]=='o'&&sp[n-2]==sp[0])||(s[n-1]=='x'&&sp[n-2]!=sp[0])))ok=1;

			}

			else if(sp[0]==0&&((s[0]=='o'&&sp[n-1]==sp[1])||(s[0]=='x'&&sp[n-1]!=sp[1])))

			{

				if(sp[n-1]==1&&((s[n-1]=='o'&&sp[n-2]!=sp[0])||(s[n-1]=='x'&&sp[n-2]==sp[0])))ok=1;

				else if(sp[n-1]==0&&((s[n-1]=='o'&&sp[n-2]==sp[0])||(s[n-1]=='x'&&sp[n-2]!=sp[0])))ok=1;

			}

			if(ok)

			{

				for(int i=0;i<n;i++)

				{

					if(sp[i])cout<<"W";

					else cout<<"S";

				}

				return 0;

			}

		}

	}

	cout<<"-1";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.231948017163819x):
#include <cstdio>

int ans[100005],n;

char a[100005];

int check() {

	for(int i = 1;i <= n;i ++) {

		int l = i - 1,r = i + 1;

		if(l == 0) l = n; 

		if(r == n + 1) r = 1;

		if(ans[i] == 1) {

			if(a[i] == 'o' && ans[l] != ans[r]) return 0;

			if(a[i] == 'x' && ans[l] == ans[r]) return 0;

		}

		else {

			if(a[i] == 'o' && ans[l] == ans[r]) return 0;

			if(a[i] == 'x' && ans[l] != ans[r]) return 0;

		}

	}

	return 1;

}

void init() {

	for(int i = 2;i <= n - 1;i ++) {

		if(ans[i] == 1) {

			if(a[i] == 'o') ans[i + 1] = ans[i - 1];

			if(a[i] == 'x') {

				if(a[i] == 'o') ans[i + 1] = ans[i - 1];

				else ans[i + 1] = (ans[i - 1] == 1?2:1);

			}

		}

		if(ans[i] == 2) {

			if(a[i] == 'x') ans[i + 1] = ans[i - 1];

			if(a[i] == 'o') {

				if(a[i] == 'o') ans[i + 1] = (ans[i - 1] == 1?2:1);

				else ans[i + 1] = ans[i - 1];

			}

		}

	}

}



void print() {

	for(int i = 1;i <= n;i ++) {

		if(ans[i] == 1) printf("S");

		else printf("W");

	}

}

int main() {

	scanf("%d",&n);

	scanf("%s",a + 1);

	ans[1] = ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 1,ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 2,ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	printf("-1\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

const int M=1e6;

int a[M];

int main(){

	int n;

	string s;

	cin>>n>>s;

	s+=s;

	for(int i1=0;i1<2;i1++){

		for(int i2=0;i2<2;i2++){

			a[0]=i1;a[1]=i2;

			for(int i=2;i<=n+1;i++){

				if(s[i-1]=='o'&&a[i-1]==0) a[i]=1-a[i-2];

				if(s[i-1]=='o'&&a[i-1]==1) a[i]=a[i-2];

				if(s[i-1]=='x'&&a[i-1]==0) a[i]=a[i-2];

				if(s[i-1]=='x'&&a[i-1]==1) a[i]=1-a[i-2];

			}

			if(a[n]==a[0]&&a[n+1]==a[1]){

				for(int i=0;i<n;i++){

					cout<<(a[i]?'S':'W');

				}

				return 0;

			}

		}

	}

	cout<<-1<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.286866970207307x):
#include <cstdio>

int ans[100005],n;

char a[100005];

int check() {

	for(int i = 1;i <= n;i ++) {

		int l = i - 1,r = i + 1;

		if(l == 0) l = n; 

		if(r == n + 1) r = 1;

		if(ans[i] == 1) {

			if(a[i] == 'o' && ans[l] != ans[r]) return 0;

			if(a[i] == 'x' && ans[l] == ans[r]) return 0;

		}

		else {

			if(a[i] == 'o' && ans[l] == ans[r]) return 0;

			if(a[i] == 'x' && ans[l] != ans[r]) return 0;

		}

	}

	return 1;

}

void init() {

	for(int i = 2;i <= n - 1;i ++) {

		if(ans[i] == 1) {

			if(a[i] == 'o') ans[i + 1] = ans[i - 1];

			if(a[i] == 'x') {

				if(a[i] == 'o') ans[i + 1] = ans[i - 1];

				else ans[i + 1] = (ans[i - 1] == 1?2:1);

			}

		}

		if(ans[i] == 2) {

			if(a[i] == 'x') ans[i + 1] = ans[i - 1];

			if(a[i] == 'o') {

				if(a[i] == 'o') ans[i + 1] = (ans[i - 1] == 1?2:1);

				else ans[i + 1] = ans[i - 1];

			}

		}

	}

}



void print() {

	for(int i = 1;i <= n;i ++) {

		if(ans[i] == 1) printf("S");

		else printf("W");

	}

}

int main() {

	scanf("%d",&n);

	scanf("%s",a + 1);

	ans[1] = ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 1,ans[2] = 2;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	ans[1] = 2,ans[2] = 1;

	init();

	if(check()) {

		print();

		printf("\n");

		return 0;

	}

	printf("-1\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1241447940617013x):
#include<bits/stdc++.h>

using namespace std;



char s[100005],ans[100005];

int n;



int main(){

	scanf("%d%s",&n,&s);

	char tmp;

	bool f=false;

	for(int i=0;i<4;i++){

		if(i/2==0) ans[0]='S';

		else ans[0]='W';

		if(i%2==0) ans[1]='S';

		else ans[1]='W';

		for(int j=2;j<n;j++){

			tmp=s[j-1];

			if(ans[j-1]=='W') tmp='o'+'x'-tmp;

			if(tmp=='o') ans[j]=ans[j-2];

			else ans[j]='S'+'W'-ans[j-2];

		}

		if(ans[n-2]==ans[0]) tmp='o';

		else tmp='x';

		if(ans[n-1]=='W') tmp='o'+'x'-tmp;

		if(s[n-1]!=tmp) continue;

		if(ans[n-1]==ans[1]) tmp='o';

		else tmp='x';

		if(ans[0]=='W') tmp='o'+'x'-tmp;

		if(s[0]!=tmp) continue;

		f=true;

		break;

	}

	if(!f) printf("-1\n");

	else printf("%s\n",ans);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1133489084268802x):
#include<bits/stdc++.h>

using namespace std;



int res[100005],n;

string s;



int main(){

	cin>>n>>s;

	for(int i=0;i<2;i++)

		for(int j=0;j<2;j++){

			res[0]=i;

			res[1]=j;

			bool flag=true;

			for(int k=2;k<n;k++) 

				res[k]=(s[k-1]!='o')^res[k-1]^res[k-2];

			for(int k=0;k<n;k++){

				int a=(k-1+n)%n,b=(k+1+n)%n;

				if(res[k]^(s[k]=='o')!=(res[a]==res[b])) flag=false;

			}	

			if(flag){

				for(int i=0;i<n;i++) cout<<(res[i]?'W':'S');

				return 0;

			}

		}

	cout<<-1;

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1090881696177743x):
#include<iostream>

#include<cstdio>

using namespace std;



int zz[100005],n;

string dat;



int main()

{

	cin>>n>>dat;

	for(int i=0;i<2;i++)

		for(int j=0;j<2;j++)

		{

			zz[0]=i;

			zz[1]=j;

			for(int k=1;k<n-1;k++)

			{

				zz[k+1]=zz[k]^zz[k-1]^(dat[k]=='x');

			}

			if((dat[n-1]=='x')==(zz[n-2]^zz[n-1]^zz[0]) && (dat[0]=='x')==(zz[n-1]^zz[0]^zz[1]))

			{

				for(int k=0;k<n;k++)

					cout<<(zz[k]?"W":"S");

				cout<<endl;

				return 0;

			}

		}

	cout<<"-1"<<endl;

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1137962223847673x):
#include<bits/stdc++.h>

using namespace std;

string dat;

bool zz[100010];

int main(){

	long long n,i,j,k;

	cin>>n>>dat;

	for(i=0;i<=1;i++)

		for(j=0;j<=1;j++){

			zz[0]=i;

			zz[1]=j;

			for(k=1;k<=n-2;k++)

				zz[k+1]=zz[k-1]^zz[k]^(dat[k]=='x');

			if((dat[n-1]=='x')==(zz[n-2]^zz[n-1]^zz[0])&&(dat[0]=='x')==(zz[n-1]^zz[0]^zz[1])){

				for(k=0;k<=n-1;k++)cout<<(zz[k]?'W':'S');

				cout<<'\n';

				return 0;

			} 

		}

	cout<<-1<<'\n';

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.112670785178217x):
#include<bits/stdc++.h>

using namespace std;

char p[100010];

long long S[100010],P[100010],n;

int main(){

	cin>>n;

	scanf("%s",p);

	long long i,j;

	for(i=0;p[i];i++){

		if(p[i]=='o')P[i+1]=0;

		else P[i+1]=1;

	}

	P[n+1]=P[1];

	for(i=0;i<8;i++){

		S[0]=i&1;

		S[1]=(i>>1)&1;

		S[2]=(i>>2)&1;

		for(j=2;j<=n+1;j++)S[j+1]=S[j-2]^P[j];

		if(S[0]^S[n]^S[1]^S[n+1]||S[1]^S[n+1]^S[2]^S[n+2])continue;

		for(j=1;j<=n;j++)cout<<(S[j]^S[j-1]?'W':'S');

		return 0;

	}

	cout<<-1;

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



bool a[100010],r[100010];

int n;



void solve(){

	for(int i=1;i<n;i++){

		if(r[i]==1){

			if(a[i]==0) a[i+1]=a[i-1];

			else a[i+1]=1-a[i-1];

		}

		else{

			if(a[i]==0) a[i+1]=1-a[i-1];

			else a[i+1]=a[i-1];

		}

	}

	int x;

	if(r[0]==1){

		if(a[0]==0) x=a[1];

		else x=1-a[1];

	}

	else{

		if(a[0]==0) x=1-a[1];

		else x=a[1];

	}

	if(a[n]==a[0]&&a[n-1]==x){

		for(int i=0;i<n;i++){

			if(a[i]==0) cout<<"S";

			else cout<<"W";

		}

		exit(0);

	}

}



int main(){

	cin>>n;

	for(int i=0;i<n;i++){

		char x;

		cin>>x;

		if(x=='o') r[i]=1;

		else r[i]=0;

	}

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=0;

	a[1]=1;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=0;

	solve();

	memset(a,0,sizeof(a));

	a[0]=1;

	a[1]=1;

	solve();

	cout<<"-1"<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1194399426530186x):
// luogu-judger-enable-o2

#include <bits/stdc++.h>

using namespace std;

char p[101000];

int S[101000],P[101000],n;

int main() {

    scanf("%d",&n);

    scanf("%s",p);

    int i,j;

    for(int i=0;p[i];i++) {

        if(p[i]=='o') P[i+1]=0;

        else P[i+1]=1;

    }

    P[n+1]=P[1];

    for(int i=0;i<8;i++) {

        S[0]=i&1;

        S[1]=(i>>1)&1;

        S[2]=(i>>2)&2;

        for(int j=2;j<=n+1;j++) {

            S[j+1]=S[j-2]^P[j];

        }

        if(S[0]^S[n]^S[1]^S[n+1] || S[1]^S[n+1]^S[2]^S[n+2]) continue ;

        for(int j=1;j<=n;j++) {

            printf("%c",(S[j]^S[j-1])?'W':'S');

        }

        cout<<endl;

 //       system("pause");

        return 0;

    }

    cout<<-1<<endl;

 //   system("pause");

}