import os fn main(){for i:=0;i<32;i++{a:=os.get_line() println(if a[1]==a[2]{a[2]}else{a[4]})}}