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

const int mod = 1e9 + 7;

int mul(int x, int y) {
    return 1LL * x * y % mod;
}

void upd(int &x, int y) {
    if ((x += y) >= mod) x -= mod;
}

int main() {
    int n, K;
    cin >> n >> K;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    static int dp[101][101][256];
    dp[0][0][0] = 1;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < 100; j++) {
            for (int k = 0; k < 256; k++) {
                upd(dp[i + 1][j][k], dp[i][j][k]);
                upd(dp[i + 1][j + 1][k ^ a[i]], dp[i][j][k]);
            }
        }
    }
    int ans = 0;
    int fact = 1;
    for (int i = 1; i <= n; i++) {
        fact = mul(i, fact);
        upd(ans, mul(fact, dp[n][i][K]));
    }
    cout << ans << endl;
}