#include typedef long long ll; #define INF 1000000000 using namespace std; #define N 1000000 #define MOD 1000000007 int main(void){ ll a,b,n; cin>>a>>b>>n; ll f[3]; f[0]=a;f[1]=b; f[2]=(f[0]^f[1]); cout<