#include <stdio.h>

/*#define d*/
#define false 0
#define true 1

int main()
{
        int s1Bool,s2Bool,w1Bool,w2Bool;
        int i;
        int inputNum=0;
        scanf("%d", &inputNum);
        char input[inputNum+1], s1[inputNum+1], s2[inputNum+1], w1[inputNum+1], w2[inputNum+1];
        scanf("%s", &input);

        s1[0]=s1[1]=s2[1]=w1[0]='S';
        s2[0]=w1[1]=w2[0]=w2[1]='W';
        input[inputNum]=s1[inputNum]=s2[inputNum]=w1[inputNum]=w2[inputNum]='\0';
        s1Bool=s2Bool=w1Bool=w2Bool=false;

        for(i=1; i<inputNum-1; i++)
        {
                if(input[i]=='o')
                {
                        s1[i+1]=(s1[i]=='S'?s1[i-1]:s1[i-1]=='S'?'W':'S');
                        s2[i+1]=(s2[i]=='S'?s2[i-1]:s2[i-1]=='S'?'W':'S');
                        w1[i+1]=(w1[i]=='S'?w1[i-1]:w1[i-1]=='S'?'W':'S');
                        w2[i+1]=(w2[i]=='S'?w2[i-1]:w2[i-1]=='S'?'W':'S');
                }
                else if(input[i]=='x')
                {
                        s1[i+1]=(s1[i]=='W'?s1[i-1]:s1[i-1]=='S'?'W':'S');
                        s2[i+1]=(s2[i]=='W'?s2[i-1]:s2[i-1]=='S'?'W':'S');
                        w1[i+1]=(w1[i]=='W'?w1[i-1]:w1[i-1]=='S'?'W':'S');
                        w2[i+1]=(w2[i]=='W'?w2[i-1]:w2[i-1]=='S'?'W':'S');
                }
        }

#ifdef d
        printf("input: %s\n", input);

        printf("s1: %s\n", s1);
        printf("s2: %s\n", s2);
        printf("w1: %s\n", w1);
        printf("w2: %s\n", w2);
#endif

        if(input[inputNum-1]=='o')
        {
                if((s1[inputNum-1]=='S' && s1[inputNum-2]==s1[0]) || (s1[inputNum-1]=='W' && s1[inputNum-2]!=s1[0]))
                {
                        s1Bool=true;
                }
                if((s2[inputNum-1]=='S' && s2[inputNum-2]==s2[0]) || (s2[inputNum-1]=='W' && s2[inputNum-2]!=s2[0]))
                {
                        s2Bool=true;
                }
                if((w1[inputNum-1]=='S' && w1[inputNum-2]==w1[0]) || (w1[inputNum-1]=='W' && w1[inputNum-2]!=w1[0]))
                {
                        w1Bool=true;
                }
                if((w2[inputNum-1]=='S' && w2[inputNum-2]==w2[0]) || (w2[inputNum-1]=='W' && w2[inputNum-2]!=w2[0]))
                {
                        w2Bool=true;
                }
        }
        else if(input[inputNum-1]=='x')
        {
                if((s1[inputNum-1]=='S' && s1[inputNum-2]!=s1[0]) || (s1[inputNum-1]=='W' && s1[inputNum-2]==s1[0]))
                {
                        s1Bool=true;
                }
                if((s2[inputNum-1]=='S' && s2[inputNum-2]!=s2[0]) || (s2[inputNum-1]=='W' && s2[inputNum-2]==s2[0]))
                {
                        s2Bool=true;
                }
                if((w1[inputNum-1]=='S' && w1[inputNum-2]!=w1[0]) || (w1[inputNum-1]=='W' && w1[inputNum-2]==w1[0]))
                {
                        w1Bool=true;
                }
                if((w2[inputNum-1]=='S' && w2[inputNum-2]!=w2[0]) || (w2[inputNum-1]=='W' && w2[inputNum-2]==w2[0]))
                {
                        w2Bool=true;
                }
        }

#ifdef d
        printf("s1Bool: %d\n", s1Bool);
        printf("s2Bool: %d\n", s2Bool);
        printf("w1Bool: %d\n", w1Bool);
        printf("w2Bool: %d\n", w2Bool);
#endif

        if(input[0]=='o')
        {
                if(s1Bool && ((s1[0]=='S' && s1[inputNum-1]==s1[1]) || (s1[0]=='W' && s1[inputNum-1]!=s1[1])))
                {
                        printf("%s\n", s1);
                        return 0;
                }
                if(s2Bool && ((s2[0]=='S' && s2[inputNum-1]==s2[1]) || (s2[0]=='W' && s2[inputNum-1]!=s2[1])))
                {
                        printf("%s\n", s2);
                        return 0;
                }
                if(w1Bool && ((w1[0]=='S' && w1[inputNum-1]==w1[1]) || (w1[0]=='W' && w1[inputNum-1]!=w1[1])))
                {
                        printf("%s\n", w1);
                        return 0;
                }
                if(w2Bool && ((w2[0]=='S' && w2[inputNum-1]==w2[1]) || (w2[0]=='W' && w2[inputNum-1]!=w2[1])))
                {
                        printf("%s\n", w2);
                        return 0;
                }
        }
        else if (input[0]=='x')
        {
                if(s1Bool && ((s1[0]=='S' && s1[inputNum-1]!=s1[1]) || (s1[0]=='W' && s1[inputNum-1]==s1[1])))
                {
                        printf("%s\n", s1);
                        return 0;
                }
                if(s2Bool && ((s2[0]=='S' && s2[inputNum-1]!=s2[1]) || (s2[0]=='W' && s2[inputNum-1]==s2[1])))
                {
                        printf("%s\n", s2);
                        return 0;
                }
                if(w1Bool && ((w1[0]=='S' && w1[inputNum-1]!=w1[1]) || (w1[0]=='W' && w1[inputNum-1]==w1[1])))
                {
                        printf("%s\n", w1);
                        return 0;
                }
                if(w2Bool && ((w2[0]=='S' && w2[inputNum-1]!=w2[1]) || (w2[0]=='W' && w2[inputNum-1]==w2[1])))
                {
                        printf("%s\n", w2);
                        return 0;
                }
        }

        printf("-1\n");
        return 0;
}

Measured memory_bytes: 768