import os fn main(){for a.len>0 {a:=os.get_line() print(a[if a[1]==a[2]{2}else{4}])}}