#include<iostream>
using namespace std;
const long long mod = 1000000007LL;
long long n, k, a[102], dp[102][256][102], fact[102], sum;
int main() {
cin >> n >> k; for (int i = 0; i < n; i++)cin >> a[i];
dp[0][0][0] = 1;
fact[1] = 1; for (int i = 2; i <= 100; i++) { fact[i] = fact[i - 1] * i; fact[i] %= mod; }
for (int i = 0; i < n; i++) {
for (int j = 0; j < 256; j++) {
for (int k = 0; k < n; k++) {
if (dp[i][j][k] == 0)continue;
dp[i + 1][j^a[i]][k + 1] += dp[i][j][k]; dp[i + 1][j^a[i]][k + 1] %= mod;
dp[i + 1][j][k] += dp[i][j][k]; dp[i + 1][j][k] %= mod;
}
}
}
for (int i = 1; i <= n; i++) { sum += dp[n][k][i] * fact[i]; sum %= mod; }
cout << sum << endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmNvbnN0IGxvbmcgbG9uZyBtb2QgPSAxMDAwMDAwMDA3TEw7CmxvbmcgbG9uZyBuLCBrLCBhWzEwMl0sIGRwWzEwMl1bMjU2XVsxMDJdLCBmYWN0WzEwMl0sIHN1bTsKaW50IG1haW4oKSB7CgljaW4gPj4gbiA+PiBrOyBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKyljaW4gPj4gYVtpXTsKCWRwWzBdWzBdWzBdID0gMTsKCWZhY3RbMV0gPSAxOyBmb3IgKGludCBpID0gMjsgaSA8PSAxMDA7IGkrKykgeyBmYWN0W2ldID0gZmFjdFtpIC0gMV0gKiBpOyBmYWN0W2ldICU9IG1vZDsgfQoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlmb3IgKGludCBqID0gMDsgaiA8IDI1NjsgaisrKSB7CgkJCWZvciAoaW50IGsgPSAwOyBrIDwgbjsgaysrKSB7CgkJCQlpZiAoZHBbaV1bal1ba10gPT0gMCljb250aW51ZTsKCQkJCWRwW2kgKyAxXVtqXmFbaV1dW2sgKyAxXSArPSBkcFtpXVtqXVtrXTsgZHBbaSArIDFdW2peYVtpXV1bayArIDFdICU9IG1vZDsKCQkJCWRwW2kgKyAxXVtqXVtrXSArPSBkcFtpXVtqXVtrXTsgZHBbaSArIDFdW2pdW2tdICU9IG1vZDsKCQkJfQoJCX0KCX0KCWZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgeyBzdW0gKz0gZHBbbl1ba11baV0gKiBmYWN0W2ldOyBzdW0gJT0gbW9kOyB9Cgljb3V0IDw8IHN1bSA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=