/*No.486 3 Straight Win(3連勝)*/ import java.io.*; public class No486 { public static void main(String[] args) { try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){ String result=input.readLine(); int eastPoint=Search(result,"East"),westPoint=Search(result,"West"); if(eastPoint==-1||westPoint==-1){ Judge(eastPoint,westPoint,true); }else{ Judge(eastPoint,westPoint,false); } }catch(Exception e){ e.printStackTrace(); } } static int Search (String result,String team){ int score=0; if(team.equals("East")){ score=result.indexOf("OOO"); }else if(team.equals("West")){ score=result.indexOf("XXX"); } return score; } static void Judge(int East,int West,boolean flg){ if(flg==true){ if(East>West){ System.out.println("East"); }else if(East