/
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
ある都にて、東軍と西軍が戦っています。
高橋君は戦っている軍勢の情報を文字列 S として記録しました。
S には文字 E と W のみが含まれており、 S に含まれる文字 E の数と東軍の人数、 W の数と西軍の人数がそれぞれ一致します。
高橋君が記録した S が与えられるので、東軍の人数が西軍の人数より多いなら East 、西軍の人数が東軍の人数より多いなら West と出力してください。
なお、 S の長さは奇数であることが保証されます。そのため、東軍と西軍のどちらか一方がもう一方に比べて真に人数が多い (つまり、両方の軍勢の人数が同じであることはない) ことが証明できます。
制約
- S は長さ 1 以上 99 以下の
EとWからなる文字列 - S の長さは奇数
入力
入力は以下の形式で標準入力から与えられる。
S
出力
答えを出力せよ。
入力例 1
EEWEW
出力例 1
East
S に E が 3 個、 W が 2 個含まれるため、東軍 3 人に対して西軍 2 人です。
東軍の人数が西軍の人数より多いので East と出力してください。
入力例 2
WWWWWWW
出力例 2
West
S に E が 0 個、 W が 7 個含まれるため、東軍 0 人に対して西軍 7 人です。
西軍の人数が東軍の人数より多いので West と出力してください。
Score : 100 points
Problem Statement
The Eastern Army and the Western Army are at war in a certain capital.
Takahashi recorded information about the fighting forces as a string S.
S contains only the characters E and W, and the number of Es in S equals the number of soldiers in the Eastern Army, and the number of Ws equals the number of soldiers in the Western Army.
Given the string S that Takahashi recorded, output East if the Eastern Army has more soldiers than the Western Army, or West if the Western Army has more soldiers than the Eastern Army.
The length of S is guaranteed to be odd. Thus, it can be proved that exactly one of the two armies strictly outnumbers the other (that is, the two armies cannot have the same number of soldiers).
Constraints
- S is a string of length between 1 and 99, inclusive, consisting of
EandW. - The length of S is odd.
Input
The input is given from Standard Input in the following format:
S
Output
Output the answer.
Sample Input 1
EEWEW
Sample Output 1
East
S contains three Es and two Ws, so the Eastern Army has three soldiers and the Western Army has two soldiers.
Since the Eastern Army has more soldiers than the Western Army, output East.
Sample Input 2
WWWWWWW
Sample Output 2
West
S contains zero Es and seven Ws, so the Eastern Army has zero soldiers and the Western Army has seven soldiers.
Since the Western Army has more soldiers than the Eastern Army, output West.