import Data.Array.Unboxed
import Data.Bool
import qualified Data.ByteString.Char8  as C
import Data.List
import Data.Maybe

main = sol <$> getn <*> gets >>= put

getn = fst . fromJust . C.readInt <$> C.getLine

gets = C.filter ((||) <$> ('o' ==) <*> ('x' ==)) <$> C.getLine

put = putStrLn . (flip bool "-1" <*> null)

sol n s = maybe "-1" init $ find ((==) <$> head <*> last) [ss,ws,sw,ww]
  where
  a = listArray (0,n) $ (=='o') <$> C.last s:C.unpack s :: UArray Int Bool
  ss = 'S':unfoldr step ('S','S',1)
  sw = 'W':unfoldr step ('S','W',1)
  ws = 'S':unfoldr step ('W','S',1)
  ww = 'W':unfoldr step ('W','W',1)
  step ('S','S',i) = if i<=n
    then Just (nxt, ('S',nxt,i+1))
    else Nothing
    where
    nxt = bool 'W' 'S' (a!i)
  step ('S','W',i) = if i<=n 
    then Just (nxt, ('W',nxt,i+1))
    else Nothing
    where
    nxt = bool 'S' 'W' (a!i)
  step ('W','S',i) = if i<=n 
    then Just (nxt, ('S',nxt,i+1))
    else Nothing
    where
    nxt = bool 'S' 'W' (a!i)
  step ('W','W',i) = if i<=n
    then Just (nxt, ('W',nxt,i+1))
    else Nothing
    where
    nxt = bool 'W' 'S' (a!i)