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>
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x + _y;
  if (_ >= _mod) _ -= _mod;
  return _;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x - _y;
  if (_ < 0) _ += _mod;
  return _;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x * _y;
  if (_ >= _mod) _ %= _mod;
  return _;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _tmp = mypow(_a, _x / 2, _mod);
  _tmp = mul(_tmp, _tmp, _mod);
  if (_x & 1) _tmp = mul(_tmp, _a, _mod);
  return _tmp;
}
long long mymul(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 0ll;
  long long _tmp = mymul(_a, _x / 2, _mod);
  _tmp = add(_tmp, _tmp, _mod);
  if (_x & 1) _tmp = add(_tmp, _a, _mod);
  return _tmp;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
int __ = 1, _cs;
struct Mat {
  int n, a[111][111];
  Mat() { n = 0; }
  Mat(int _n) {
    n = _n;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) a[i][j] = 0;
  }
  Mat operator*(const Mat& tmp) {
    Mat res(n);
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        for (int k = 0; k < n; k++)
          res.a[i][j] = add(res.a[i][j], mul(a[i][k], tmp.a[k][j]));
    return res;
  }
  Mat operator^(long long k) {
    Mat A(n), I(n);
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) {
        A.a[i][j] = a[i][j];
        I.a[i][j] = (i == j ? 1 : 0);
      }
    while (k) {
      if (k & 1) I = I * A;
      A = A * A;
      k >>= 1;
    }
    return I;
  }
};
void build() {}
long long n, k, v[111];
void init() {
  n = getint();
  k = getint();
  for (int i = 0; i < n; i++) v[i] = getint();
}
Mat a;
void solve() {
  a = Mat(n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      if (__builtin_popcountll(v[i] ^ v[j]) % 3 == 0) a.a[i][j] = 1;
  a = a ^ (k - 1);
  int ans = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) ans = add(ans, a.a[i][j]);
  cout << ans << endl;
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}