#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using PII = std::pair<int, int>;
using PLL = std::pair<ll, ll>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)


const int mod = 1e9 + 7;
const string wsp = " ";
const string tb = "\t";
const string rt = "\n";

int main()
{

#ifdef DEBUG
    cout << "DEBUG MODE" << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf());    //for debug
#endif
    const int m = 256;
    int n, l, x;
    cin >> n >> l;
    ll ans, p;
    vector<vector<ll>> bitdp(n + 1, vector<ll>(m, 0));
    bitdp[0][0] = 1;

    rep(k, n)
    {
        cin >> x;
        rep(i, n)
        {
            rep(j, m)
            {
                bitdp[n - i][j ^ x] += bitdp[n - i - 1][j];
                bitdp[n - i][j ^ x] %= mod;
            }
        }
    }

    ans = 0;
    p = 1;
    rep(i, n)
    {
        p *= i + 1;
        p %= mod;
        ans += (bitdp[i + 1][l] * p) % mod;
        ans %= mod;
    }
    cout << ans << rt;

    return 0;
}
