using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("3 1");
WillReturn.Add("1 2 3");
//3
}
else if (InputPattern == "Input2") {
WillReturn.Add("3 10");
WillReturn.Add("8 7 5");
//6
}
else if (InputPattern == "Input3") {
WillReturn.Add("25 127");
WillReturn.Add("5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 115 120 125");
//235924722
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
const long Hou = 1000000007;
static void Main()
{
List<string> InputList = GetInputList();
long[] wkArr = InputList[0].Split(' ').Select(pX => long.Parse(pX)).ToArray();
long K = wkArr[1];
long[] AArr = InputList[1].Split(' ').Select(pX => long.Parse(pX)).ToArray();
// 場合の数[個数,XOR]なDP表
const long UB_0 = 100;
const long UB_1 = 255;
long[,] DPArr = new long[UB_0 + 1, UB_1 + 1];
DPArr[0, 0] = 1;
foreach (long EachA in AArr) {
for (long I = UB_0; 0 <= I; I--) {
for (long J = UB_1; 0 <= J; J--) {
if (DPArr[I, J] == 0) continue;
long NewI = I + 1;
long NewJ = J ^ EachA;
DPArr[NewI, NewJ] += DPArr[I, J];
DPArr[NewI, NewJ] %= Hou;
}
}
}
// 1から個数までの階乗のmodを求める
long[] KaijyouArr = new long[UB_0 + 1];
KaijyouArr[0] = 1;
for (long I = 1; I <= UB_0; I++) {
KaijyouArr[I] = KaijyouArr[I - 1] * I;
KaijyouArr[I] %= Hou;
}
long Answer = 0;
for (long I = 1; I <= UB_0; I++) {
long CurrPattern = DPArr[I, K];
CurrPattern *= KaijyouArr[I];
CurrPattern %= Hou;
Answer += CurrPattern;
Answer %= Hou;
}
Console.WriteLine(Answer);
}
}