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