package main import ( "fmt" ) func main() { var F0, F1, N int fmt.Scan(&F0, &F1, &N) switch N % 3 { case 0: fmt.Println(F0) case 1: fmt.Println(F1) case 2: fmt.Println(F0 ^ F1) } }