#include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265

int n,k;
ll a[1000000];
ll ans;
int dp[300][300][300];

int main(){
  cin>>n>>k;

  rep(i,n){
    cin>>a[i+1];
  }


  dp[0][0][0]=1;

  FOR(i,1,n+1){
    rep(j,n+1){
      rep(l,270){
        int nk = l^a[i];
        dp[i][nk][j+1]+=dp[i-1][l][j];
        dp[i][l][j]+=dp[i-1][l][j];
        dp[i][nk][j+1]%=M;
        dp[i][l][j]%=M;
      }
    }
  }

  ll c = 1;
  FOR(i,1,n+1){
    c*=i;
    c%=M;
    ans+=c*(ll)dp[n][k][i]%M;
    ans%=M;
  }

  cout<<ans<<endl;

  return 0;

}