

Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
8 種類の方角(北、東、西、南、北東、北西、南東、南西)のいずれかを表す文字列 D が与えられます。方角とそれを表す文字列は以下のように対応しています。
- 北:
N
- 東:
E
- 西:
W
- 南:
S
- 北東:
NE
- 北西:
NW
- 南東:
SE
- 南西:
SW
D が表す方角の反対の方角を表す文字列を出力してください。
制約
- D は
N
,E
,W
,S
,NE
,NW
,SE
,SW
のいずれか
入力
入力は以下の形式で標準入力から与えられる。
D
出力
答えを出力せよ。
入力例 1
N
出力例 1
S
北の反対の方角である南を表す S
を出力してください。
入力例 2
SE
出力例 2
NW
南東の反対の方角である北西を表す NW
を出力してください。
Score : 100 points
Problem Statement
You are given a string D representing one of the eight directions (north, east, west, south, northeast, northwest, southeast, southwest). The correspondence between the directions and their representing strings is as follows.
- North:
N
- East:
E
- West:
W
- South:
S
- Northeast:
NE
- Northwest:
NW
- Southeast:
SE
- Southwest:
SW
Print the string representing the direction opposite to the direction denoted by D.
Constraints
- D is one of
N
,E
,W
,S
,NE
,NW
,SE
,SW
.
Input
The input is given from Standard Input in the following format:
D
Output
Print the answer.
Sample Input 1
N
Sample Output 1
S
Print S
, which represents south, the direction opposite to north.
Sample Input 2
SE
Sample Output 2
NW
Print NW
, which represents northwest, the direction opposite to southeast.