-export([main/1]). f()->{_,[B,C,E]}=io:fread("","~*c~c~c ~c~*s"),io:format(if B==C->B;1>0->E end). main(_)->[f()||_<-lists:seq(1,32)].