#include <stdio.h>
#define MAXNUM 100001

int main(void)
{
    int N = 0;
    int i;
    char judge[MAXNUM] = {'\0'};
    int animal[MAXNUM] = {-1};

    scanf("%d", &N);
    scanf("%s", judge);

    animal[0] = 0; //S:0, W:1
    animal[N - 1] = 1;
    for (i = 0; i < N; i++)
    {
        if (judge[i] == 'o')
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = !animal[N - 1];
                else
                    animal[i + 1] = animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = !animal[N - 2];
                else
                    animal[0] = animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = !animal[i - 1];
                else
                    animal[i + 1] = animal[i - 1];
            }
        }
        else
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = animal[N - 1];
                else
                    animal[i + 1] = !animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = animal[N - 2];
                else
                    animal[0] = !animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = animal[i - 1];
                else
                    animal[i + 1] = !animal[i - 1];
            }
        }
    }

    if (animal[0] == 0 && animal[N-1] == 1)
    {
        for (i = 0; i < N; i++)
        {
            if (animal[i])
                printf("W");
            else
                printf("S");
        }
        return 0;
    }

    animal[0] = 0; //S:0, W:1
    animal[N - 1] = 0;
    for (i = 0; i < N; i++)
    {
        if (judge[i] == 'o')
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = !animal[N - 1];
                else
                    animal[i + 1] = animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = !animal[N - 2];
                else
                    animal[0] = animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = !animal[i - 1];
                else
                    animal[i + 1] = animal[i - 1];
            }
        }
        else
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = animal[N - 1];
                else
                    animal[i + 1] = !animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = animal[N - 2];
                else
                    animal[0] = !animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = animal[i - 1];
                else
                    animal[i + 1] = !animal[i - 1];
            }
        }
    }

    if (animal[0] == 0 && animal[N-1] == 0)
    {
        for (i = 0; i < N; i++)
        {
            if (animal[i])
                printf("W");
            else
                printf("S");
        }
        return 0;
    }

    animal[0] = 1; //S:0, W:1
    animal[N - 1] = 0;
    for (i = 0; i < N; i++)
    {
        if (judge[i] == 'o')
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = !animal[N - 1];
                else
                    animal[i + 1] = animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = !animal[N - 2];
                else
                    animal[0] = animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = !animal[i - 1];
                else
                    animal[i + 1] = animal[i - 1];
            }
        }
        else
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = animal[N - 1];
                else
                    animal[i + 1] = !animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = animal[N - 2];
                else
                    animal[0] = !animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = animal[i - 1];
                else
                    animal[i + 1] = !animal[i - 1];
            }
        }
    }

    if (animal[0] == 1 && animal[N-1] == 0)
    {
        for (i = 0; i < N; i++)
        {
            if (animal[i])
                printf("W");
            else
                printf("S");
        }
        return 0;
    }

    animal[0] = 1; //S:0, W:1
    animal[N - 1] = 1;
    for (i = 0; i < N; i++)
    {
        if (judge[i] == 'o')
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = !animal[N - 1];
                else
                    animal[i + 1] = animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = !animal[N - 2];
                else
                    animal[0] = animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = !animal[i - 1];
                else
                    animal[i + 1] = animal[i - 1];
            }
        }
        else
        {
            if (i == 0)
            {
                if (animal[i])
                    animal[i + 1] = animal[N - 1];
                else
                    animal[i + 1] = !animal[N - 1];
            }
            else if (i == N-1)
            {
                if (animal[i])
                    animal[0] = animal[N - 2];
                else
                    animal[0] = !animal[N - 2];
            }
            else
            {
                if (animal[i])
                    animal[i + 1] = animal[i - 1];
                else
                    animal[i + 1] = !animal[i - 1];
            }
        }
    }

    if (animal[0] == 1 && animal[N-1] == 1)
    {
        for (i = 0; i < N; i++)
        {
            if (animal[i])
                printf("W");
            else
                printf("S");
        }
        return 0;
    }

    printf("-1");

    return 0;
}

Measured memory_bytes: 768