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