Problem: You are given n integers a1, a2, ..., an.

A sequence of integers x1, x2, ..., xk is called a "xor-sequence" if for every 1 ≤ i ≤ k - 1 the number of ones in the binary representation of the number xi <image> xi + 1's is a multiple of 3 and <image> for all 1 ≤ i ≤ k. The symbol <image> is used for the binary exclusive or operation.

How many "xor-sequences" of length k exist? Output the answer modulo 109 + 7.

Note if a = [1, 1] and k = 1 then the answer is 2, because you should consider the ones from a as different.

Input

The first line contains two integers n and k (1 ≤ n ≤ 100, 1 ≤ k ≤ 1018) — the number of given integers and the length of the "xor-sequences".

The second line contains n integers ai (0 ≤ ai ≤ 1018).

Output

Print the only integer c — the number of "xor-sequences" of length k modulo 109 + 7.

Examples

Input

5 2
15 1 2 4 8


Output

13


Input

5 1
15 1 2 4 8


Output

5

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
const long long MOD = (int)1e9 + 7;
const long long INF = 2e18 + 5;
struct hashLL {
  size_t operator()(long long x) const {
    x = (x ^ (x >> 30)) * UINT64_C(0xbf58476d1ce4e5b9);
    x = (x ^ (x >> 27)) * UINT64_C(0x94d049bb133111eb);
    x = x ^ (x >> 31);
    return x;
  }
};
long long inv(long long a, long long b) {
  return 1 < a ? b - inv(b % a, a) * b / a : 1;
}
template <class T>
void coutend(T arg) {
  cout << arg << '\n';
}
template <class T>
void coutsp(T arg) {
  cout << arg << ' ';
}
template <class T>
void coutarrsp(T arr, int l, int r) {
  for (int i = l; i <= r; i++) {
    cout << arr[i] << ' ';
  }
  cout << '\n';
}
template <class T>
void coutarr(T arr, int l, int r) {
  for (int i = l; i <= r; i++) {
    cout << arr[i];
  }
  cout << '\n';
}
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
long long distsq(long long x1, long long y1, long long x2, long long y2) {
  return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
}
const int N = 100;
long long n, m, k, t, u, v;
long long arr[N];
int curr = 3;
long long dp[N][N][121];
unordered_map<long long, long long> to;
void solve(long long num) {
  if (to.count(num)) return;
  long long hf = (num + 1) / 2;
  solve(hf);
  to[hf * 2 - 1] = curr++;
  long long prv = to[hf];
  long long here = curr - 1;
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (n); j++) {
      for (int k = 0; k < (n); k++) {
        dp[i][k][here] =
            (dp[i][k][here] + (dp[i][j][prv] * dp[j][k][prv]) % MOD) % MOD;
      }
    }
  }
  if (num % 2 == 0) {
    to[num] = curr++;
    long long newhere = curr - 1;
    for (int i = 0; i < (n); i++) {
      for (int j = 0; j < (n); j++) {
        for (int k = 0; k < (n); k++) {
          dp[i][k][newhere] =
              (dp[i][k][newhere] + (dp[i][j][here] * dp[j][k][2]) % MOD) % MOD;
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  memset(dp, 0, sizeof(dp));
  cin >> n >> k;
  for (int i = 0; i < (n); i++) cin >> arr[i];
  for (int i = 0; i < (n); i++) {
    dp[i][i][1] = 1;
    for (int j = 0; j < (n); j++) {
      long long val = arr[i] ^ arr[j];
      long long num1s = 0;
      for (int i = 0; i < (64); i++)
        if (val & (1LL << i)) num1s++;
      if (num1s % 3 == 0) {
        dp[i][j][2] = 1;
      }
    }
  }
  to[1] = 1;
  to[2] = 2;
  solve(k);
  long long tok = to[k];
  long long ans = 0;
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (n); j++) {
      ans = (ans + dp[i][j][tok]) % MOD;
    }
  coutend(ans);
}