#include<bits/stdc++.h> using namespace std; int main(){ string n; char f[4]={'E','W','S','N'}; int s=3; int cnt=0,x=2,y=2; while(cnt!=4){ cin>>n; if(n=="GO"){ cout<<"FAIL"; cnt++; }else if(n=="LEFT"){ if(s!=0){ s--; cout<<f[s]; }else{ s=4; cout<<f[s]; } }else if(n=="RIGHT"){ if(s!=4){ s++; cout<<f[s]; }else{ s=0; cout<<f[s]; } } } cout<<"END"<<endl; cout<<"###"<<endl; cout<<"#.#"<<endl; cout<<"###"<<endl; return 0; }