a=int(input("a ? ")) b=int(input("b ? ")) re=int(input("re ? ")) S=(a ^ b) ^ re print(S) rs=(re and (a ^ b)) or (a and b) print(rs)