
module Main where

import Debug.Trace

main :: IO ()
main = do
  getLine
  s <- parse <$> getLine
  --s `traceShow` (putStrLn . decode) $ solve s
  (putStrLn . decode) $ solve s

parse :: String -> [Bool]
parse s = map (\a -> a == 'o') s

decode :: [Bool] -> String
decode [] = "-1"
decode s = map (\a -> if a  then 'S' else 'W') s 

solve :: [Bool] -> [Bool]
solve s = if null cand then [] else (head cand)
  where
    start_pattern = [[True, True], [True, False], [False, True], [False, False]]
    s' = tail s ++ [head s]
    cand = filter (not . null) . map (\p -> let p' = (build s' p) in if valid p p' then (reverse . tail . tail $ p') else []) $ start_pattern

build :: [Bool] -> [Bool] -> [Bool]
build (t:ts) cand@(c:s:ss)
  |     t &&     c = build ts (    s:cand)
  | not t &&     c = build ts (not s:cand)
  |     t && not c = build ts (not s:cand)
  | not t && not c = build ts (    s:cand)
  | otherwise = undefined
build [] cand = cand

valid :: [Bool] -> [Bool] -> Bool
valid (p1:p2:_) (c1:c2:_) = p1 == c1 && p2 == c2
valid _ _ = undefined
