#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); }

template<uint MD>
struct ModInt {
    uint v;
    ModInt() : v{0} {}
    ModInt(ll v) : v{normS(v%MD+MD)} {}
    static uint normS(const uint &x) {return (x<MD)?x:x-MD;};
    static ModInt make(const uint &x) {ModInt m; m.v = x; return m;}
    ModInt operator+(const ModInt &r) const {return make(normS(v+r.v));}
    ModInt operator-(const ModInt &r) const {return make(normS(v+MD-r.v));}
    ModInt operator*(const ModInt &r) const {return make((ull)v*r.v%MD);}
    ModInt& operator+=(const ModInt &r) {return *this=*this+r;}
    ModInt& operator-=(const ModInt &r) {return *this=*this-r;}
    ModInt& operator*=(const ModInt &r) {return *this=*this*r;}
    static ModInt inv(const ModInt &x) {
        return pow(ModInt(x), MD-2);
    }
};
using Mint = ModInt<TEN(9)+7>;

const int MN = 110;

int main() {
    int n, K;
    cin >> n >> K;
    static Mint dp[MN][MN][256];
    dp[0][0][0] = 1;
    for (int i = 0; i < n; i++) {
        int a;
        cin >> a;
        for (int j = 0; j <= n; j++) {
            for (int k = 0; k < 256; k++) {
                dp[i+1][j][k] += dp[i][j][k];
                if (j) {
                    dp[i+1][j][k] += dp[i][j-1][k^a];
                }
            }
        }
    }

    Mint ans = 0;
    Mint base = 1;
    for (int i = 1; i <= n; i++) {
        base *= i;
        ans += dp[n][i][K] * base;
    }
    cout << ans.v << endl;
    return 0;
}

