#define _USE_MATH_DEFINES
#pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>

#include <sstream>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <complex>

#include <string>
#include <cstring>
#include <vector>
#include <bitset>

#include <queue>
#include <set>
#include <map>
#include <stack>
#include <list>

#include <ctime>
////
//#include <random>//
#pragma endregion //#include
/////////

#pragma region typedef
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
#pragma endregion //typedef
////定数
const int INF = (int)1e9;
const LL MOD = (LL)1e9+7;
const LL LINF = (LL)4e18+20;
const LD PI = acos(-1.0);
const double EPS = 1e-9;
/////////
using namespace::std;

void solve(){
	int N,K;
	cin>>N>>K;
	vector<int> A(N);
	for(int i=0;i<N;++i){
		cin>>A[i];
	}
	vector< vector<LL> > fld(N+1,vector<LL>(256,0));
	fld[0][0] = 1;//初期値
	for(int i=0;i<N;++i){
		for(int num=i;num>=0;--num){
			for(int val=255;val>=0;--val){
				if(fld[num][val]){
					fld[num+1][val^A[i]] += fld[num][val];
					if(fld[num+1][val^A[i]] >= MOD ){
						fld[num+1][val^A[i]] -= MOD;
					}
				}
			}
		}
	}
	LL ans = fld[0][K];
	LL mul = 1;
	for(LL i=1;i<=N;++i){
		ans = ans + (fld[(int)i][K] * mul)%MOD;
		ans %= MOD;
		mul = ( mul*(i+1) ) % MOD;
	}
	cout << ans << endl;
}

#pragma region main
signed main(void){
	std::cin.tie(0);
	std::ios::sync_with_stdio(false);
	std::cout << std::fixed;//小数を10進数表示
	cout << setprecision(16);//小数点以下の桁数を指定//coutとcerrで別	

	solve();
}
#pragma endregion //main()
