Under construction

Still being built. Things may change

Physical Education Is a Coding Subject

Time limit2sMemory limit1024 MB

Summary
Given ten turn instructions (right, about, left) starting from north, print the final facing direction as N, E, S, or W.
Level

Easy1 of 10

Topics
Implementation, Simulation
Solved
No attempts yet

Problem

The UCPC Elementary School sports day is coming up. The students of Class 1, Grade 1 at UCPC Elementary School are practicing facing a specific direction as their homeroom teacher Jongseo instructs.

The students start out facing north. Jongseo gives a total of ten instructions of the following three types:

  • Right turn: each student turns 90 degrees to the right from the current direction.
  • About turn: each student turns 180 degrees to the right from the current direction.
  • Left turn: each student turns 90 degrees to the left from the current direction.

Jongseo knows that elementary students find it hard to follow instructions exactly, so he decided to give candy to students who follow his instructions successfully. Help the students change their facing direction according to Jongseo's instructions and find the direction they face at the end.

Input

Ten lines follow, each containing one integer tit_i (1≤i≤101 \le i \le 10) that describes the ii-th instruction from Jongseo, one per line. Each tit_i is 1, 2, or 3.

  • If ti=1t_i=1, the ii-th instruction is a right turn,
  • If ti=2t_i=2, the ii-th instruction is an about turn,
  • If ti=3t_i=3, the ii-th instruction is a left turn.

Output

Print the character for the direction the students face after carrying out all ten instructions. If they face north, print N. If they face east, print E. If they face west, print W. If they face south, print S.

Examples1

  1. Example 1

    Input
    1
    2
    3
    1
    2
    3
    1
    2
    3
    1
    
    Expected output
    W