#include <iostream>
#include <vector>
using namespace std;
constexpr int mod = 1e9 + 7;

int main(){
  int n, k;
  cin >> n >> k;
  vector<int> A(n);
  for(int i = 0; i < n; ++i) cin >> A[i];
  vector< vector<long long int> > DP(n+1, vector<long long int>(1<<8, 0));
  DP[0][0] = 1;
  for(int i = 0; i < n; ++i){
    vector< vector<long long int> > DP_ = DP;
    for(int j = 0; j < n; ++j){
      for(int k = 0; k < (1<<8); ++k){
        DP_[j+1][k^A[i]] += (DP[j][k]*(j+1))%mod;
        DP_[j+1][k^A[i]] %= mod;
      }
    }
    DP = DP_;
  }
  int ans = 0;
  for(int i = 0; i <= n; ++i){
    ans += DP[i][k];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
