#include #include using namespace std; int main() { int64_t a, b, c, n; cin >> a >> b >> n; c = (a ^ b); if ((n % 3) == 0) { cout << a <