let i = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0].split(' ') let c = i[2] % 3 let o if (c == 0) o = i[0] else if (c == 1) o = i[1] else o = i[0] ^ i[1] console.log(o)