#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000000000002 int main(){ int N,M,K; cin>>N>>M>>K; vector ac(1024,0),bc(1024,0); ac[0]=1,bc[0]=1; int t = 0; for(int i=0;i temp(1024,0); for(int i=0;i<1024;i++){ temp[0] = mod(temp[0] + mod(ac[i] * (ac[i]-1)/2)); for(int j=i+1;j<1024;j++){ temp[i^j] = mod(temp[i^j] + mod(ac[i]*ac[j])); } } ac = temp; } { vector temp(1024,0); for(int i=0;i<1024;i++){ temp[0] = mod(temp[0] + mod(bc[i] * (bc[i]-1)/2)); for(int j=i+1;j<1024;j++){ temp[i^j] = mod(temp[i^j] + mod(bc[i]*bc[j])); } } bc = temp; } int ans = 0; for(int i=0;i<1024;i++){ int j = i^K; ans = mod(ans + mod(ac[i] * bc[j])); } cout<