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;
using namespace placeholders;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<vector<int> >;
using VS = vector<string>;
using SS = stringstream;
using PII = pair<int, int>;
using VPII = vector<pair<int, int> >;
template <typename T = int>
using VT = vector<T>;
template <typename T = int>
using VVT = vector<vector<T> >;
template <typename T = int>
using LIM = numeric_limits<T>;
template <typename T>
inline istream &operator>>(istream &s, vector<T> &v) {
  for (T &t : v) {
    s >> t;
  }
  return s;
}
template <typename T>
inline ostream &operator<<(ostream &s, const vector<T> &v) {
  for (int i = 0; i < int(v.size()); ++i) {
    s << (" " + !i) << v[i];
  }
  return s;
}
template <typename T>
inline T fromString(const string &s) {
  T res;
  istringstream iss(s);
  iss >> res;
  return res;
}
template <typename T>
inline string toString(const T &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
}
template <typename T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
constexpr int MOD = 1000000007;
template <typename Number>
using Vector = vector<Number>;
template <typename Number>
using Matrix = vector<vector<Number> >;
template <typename Number>
Matrix<Number> identify_matrix(const int N) {
  Matrix<Number> res(N, Vector<Number>(N));
  for (int i = 0; i < N; ++i) {
    res[i][i] = 1;
  }
  return res;
}
template <typename Number>
Vector<Number> operator*(const Matrix<Number> &m, const Vector<Number> &v) {
  if (m[0].size() != v.size()) {
    throw "Matrix * Vector : size error";
  }
  Vector<Number> res(m.size());
  for (int i = 0; i < static_cast<int>(m.size()); ++i) {
    for (int k = 0; k < static_cast<int>(v.size()); ++k) {
      res[i] += m[i][k] * v[k];
    }
  }
  return res;
}
template <typename Number>
Matrix<Number> matrix_multiply(const Matrix<Number> &a, const Matrix<Number> &b,
                               unsigned int mod = 0) {
  assert(a[0].size() == b.size());
  Matrix<Number> res(a.size(), Vector<Number>(b[0].size()));
  for (int i = 0; i < static_cast<int>(a.size()); ++i) {
    for (int j = 0; j < static_cast<int>(b[0].size()); ++j) {
      for (int k = 0; k < static_cast<int>(b.size()); ++k) {
        (res[i][j] += a[i][k] * b[k][j]) %= mod;
      }
    }
  }
  return res;
}
template <typename Number>
inline const Matrix<Number> operator*(const Matrix<Number> &a,
                                      const Matrix<Number> &b) {
  return matrix_multiply(a, b);
}
template <typename Number>
Matrix<Number> power(Matrix<Number> a, long long n,
                     long long mod = numeric_limits<long long>::max()) {
  Matrix<Number> res = identify_matrix<Number>(a.size());
  while (n) {
    if (n & 1) {
      res = matrix_multiply(res, a, mod);
    }
    a = matrix_multiply(a, a, mod);
    n >>= 1;
  }
  return res;
}
bool adjacency(const LL a, const LL b) {
  int ones = 0;
  for (LL c = a ^ b; c; c >>= 1) {
    ones += c & 1;
  }
  return ones % 3 == 0;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(12) << fixed;
  LL N, K;
  cin >> N >> K;
  VT<LL> A(N);
  cin >> A;
  VVT<LL> mat(N, VT<LL>(N));
  for (int i = (int)(0); i < (int)(N); ++i) {
    for (int j = (int)(i); j < (int)(N); ++j) {
      mat[i][j] = mat[j][i] = adjacency(A[i], A[j]);
    }
  }
  const auto res = power(mat, K - 1, MOD) * Vector<LL>(N, 1);
  cout << accumulate(begin(res), end(res), 0LL) % MOD << endl;
  return 0;
}