using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var va = Console.ReadLine().Split().Select(int.Parse).ToArray(); int nn = va[2] % 3; va[2] = va[0] ^ va[1]; Console.WriteLine(va[nn]); Console.ReadLine(); } } }