#include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
typedef long long ll;
const int MOD=1e9+7;

const int MAX_N=100,MAX_K=255;

int N,K;
int A[MAX_N];

ll dp[MAX_N+1][MAX_N+1][MAX_K+1];

ll fact(int x){
	ll res=1;
	FOR(i,2,x+1){
		res*=i;
		res%=MOD;
	}
	return res;
}

int main(){
	scanf("%d %d",&N,&K);
	REP(i,N){
		scanf("%d",&A[i]);
	}
	dp[0][0][0]=1;
	FOR(i,1,N+1){
		REP(j,i+1){
			REP(k,MAX_K+1){
				dp[i][j][k]=dp[i-1][j][k];
				if (j!=0){
					dp[i][j][k]+=dp[i-1][j-1][k^A[i-1]];
				}
				dp[i][j][k]%=MOD;
			}
		}
	}
	/*
	FOR(i,1,N+1){
		REP(j,i+1){
			REP(k,MAX_K+1){
				if (dp[i][j][k]){
					fprintf(stderr,"dp[%d][%d][%d]=%lld\n",i,j,k,dp[i][j][k]);
				}
			}
		}
	}
	*/
	ll ans=0;
	FOR(i,1,N+1){
		ans+=(dp[N][i][K]*fact(i))%MOD;
		ans%=MOD;
	}
	printf("%lld\n",ans);
	return 0;
}
