#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

ll dp[111][111][256];
ll N,K;
int A[111];
ll J[111];
const ll MOD = 1000000007LL;
void update(ll &a,ll b){
  a += b;
  a %= MOD;
}

ll solve(){
  J[1] = 1;
  for(int i=2;i<=N;i++) J[i] = (J[i-1] * (ll)i)%MOD;
  dp[0][0][0] = 1LL;
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      for(int k=0;k<256;k++){
        update( dp[i+1][j+1][k^A[i]], dp[i][j][k] );
        update( dp[i+1][j][k], dp[i][j][k] );
      }
    }
  }
  ll res = 0;
  for(int i=1;i<=N;i++){
    //cout << N << " " << i << " " << K << " " << dp[N][i][K] << endl;
    update( res, dp[N][i][K] * J[i] );    
  }
  return res;
}
int main(){
  cin >> N >> K;
  for(int i=0;i<N;i++) cin >> A[i];
  cout << solve() << endl;
}
