program main
implicit none
integer :: n

  read(*,*) n
  call wolv_or_sheep(n)

contains

  subroutine wolv_or_sheep(n)
  integer,intent(in) :: n
  character(n)       :: s
  logical            :: t(n),sw(n)
  integer            :: i

    read(*,'(A)') s
    t(:) = [(s(i:i)=='o',i=1,n)]

    call test_seq( n, t, .TRUE.,  .TRUE.)
    call test_seq( n, t, .TRUE.,  .FALSE.)
    call test_seq( n, t, .FALSE., .TRUE.)
    call test_seq( n, t, .FALSE., .FALSE.)

    print'(I0)',-1

  end subroutine wolv_or_sheep

  subroutine test_seq(n,t,a1,a2)
  integer,intent(in) :: n
  logical,intent(in) :: t(n),a1,a2
  logical            :: res(n),accept
  integer            :: i

    res(1) = a1
    res(2) = a2

    do i=2,n-1
      res(i+1) = xor(res(i-1),t(i).neqv.res(i))
    enddo

    accept = xor( (res(n-1).eqv.res(1)).eqv.t(n), .not.res(n) )&
   &    .and.xor( (res(n)  .eqv.res(2)).eqv.t(1), .not.res(1) )

    if(accept)then
      do i=1,n
        if(res(i))then
          write(*,'(A)',advance='NO') 'S'
        else
          write(*,'(A)',advance='NO') 'W'
        endif
      enddo
      write(*,'(A)') ''
      STOP
    endif
!
  end subroutine test_seq
!
end program main
