use std::io;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

#[allow(dead_code)]
fn input_line_str() -> String {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

#[allow(dead_code)]
fn str2vec(s: &str) -> Vec<char> {
    let mut v: Vec<char> = Vec::new();
    for c in s.chars() {
        v.push(c);
    }
    v
}

fn calc(v: &mut Vec<char>, input: &Vec<char>) -> bool {
    for z in 2..v.len() {
        if v[z - 1] == 'S' {
            if input[z - 1] == 'o' {
                if v[z - 2] == 'S' {
                    v[z] = 'S';
                } else {
                    v[z] = 'W';
                }
            } else {
                if v[z - 2] == 'S' {
                    v[z] = 'W';
                } else {
                    v[z] = 'S';
                }
            }
        } else {
            if input[z - 1] == 'o' {
                if v[z - 2] == 'S' {
                    v[z] = 'W';
                } else {
                    v[z] = 'S';
                }
            } else {
                if v[z - 2] == 'S' {
                    v[z] = 'S';
                } else {
                    v[z] = 'W';
                }
            }
        }
    }

    let p = v[v.len() - 2];
    let n = v[0];

    if *v.last().unwrap() == 'W' {
        if *input.last().unwrap() == 'o' {
            if p == n {
                return false;
            }
        } else {
            if p != n {
                return false;
            }
        }
    } else {
        if *input.last().unwrap() == 'o' {
            if p != n {
                return false;
            }
        } else {
            if p == n {
                return false;
            }
        }
    }

    let p = v[v.len() - 1];
    let n = v[1];

    if v[0] == 'W' {
        if input[0] == 'o' {
            p != n
        } else {
            p == n
        }
    } else {
        if input[0] == 'o' {
            p == n
        } else {
            p != n
        }
    }
}

fn main() {
    let n: usize;
    input!(n);
    let s = str2vec(&input_line_str());
    let mut ans = vec!['x'; n];
    let mut flag = false;

    loop {
        ans[0] = 'S';
        ans[1] = 'S';
        flag = calc(&mut ans, &s);
        if flag {
            break;
        }
        ans[1] = 'W';
        flag = calc(&mut ans, &s);
        if flag {
            break;
        }
        ans[0] = 'W';
        ans[1] = 'S';
        flag = calc(&mut ans, &s);
        if flag {
            break;
        }
        ans[1] = 'W';
        flag = calc(&mut ans, &s);
        break;
    }

    if flag {
        for z in ans {
            write!(std::io::stdout(), "{}", z);
        }
        println!("");
    } else {
        println!("-1");
    }
}

Measured memory_bytes: 4352