Scanf.scanf "%d %d %d" (fun a b c -> Printf.printf "%d\n" @@ if a = b && b = c then a else if a <> b && b <> c && c <> a then 6 - a - b - c else a lxor b lxor c )