#include using namespace std; #include namespace mp=boost::multiprecision; template class field{ public: function add=[](double A,double B){ return (A+B); }; function product=[](double A,double B){ return (A*B); }; function in=[this](type a){ int comp; return true; };//引数が体の要素か否か function add_inverse=[this](type a){ return -a; }; function product_inverse=[this](type a){ return 1.0/a; }; type power(type a,int p){ type temp=a; type ans=one; while(p>0){ if(p%2){ ans=product(ans,temp); } p/=2; temp=product(temp,temp); } return ans; } double one=1.0,zero=0; field(string s="real",int param=1000000007){ if(s=="residue"){ int MOD=param; add=[MOD](int a,int b){ long long A=a,B=b; return (A+B)%MOD; }; product=[MOD](int a,int b){ long long A=a,B=b; return (A*B)%MOD; }; in=[MOD](type a){ int comp; return typeid(comp)==typeid(a) && 0<=a && a0){ if(p%2){ ans=(ans*temp)%MOD; } temp=(temp*temp)%MOD; p/=2; } int l=ans; return l; }; one=1,zero=0; }else if(s=="real"){ } } }; int main(){ int N,M,X; cin>>N>>M>>X; int a=0; int input; for(int i=0;i>input; a^=input; } if(a){ cout<<0< f("residue"); int ans=2; ans=f.power(ans,N-1); ans=f.power(ans,M-1); ans=f.power(ans,X); cout<