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;
struct __s {
  __s() {
    srand(time(NULL));
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
long long mod = 1000000007;
long long dp[64][100][100];
bool check(long long a, long long b) {
  long long res = a ^ b;
  long long sum = 0;
  while (res) {
    sum += res % 2;
    res /= 2;
  }
  return sum % 3 == 0;
}
int main(void) {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) {
    cin >> a[i];
  }
  vector<vector<long long> > g(n, vector<long long>());
  for (long long i = 0; i < (long long)(n); i++) {
    for (long long j = 0; j < (long long)(n); j++) {
      if (check(a[i], a[j])) {
        g[i].push_back(j);
      }
    }
    dp[0][i][i] = 1;
  }
  for (long long h = 1; h < 64; h++) {
    vector<vector<long long> > sum(n, vector<long long>(n, 0));
    for (long long j = 0; j < (long long)(n); j++) {
      for (long long k = 0; k < (long long)(n); k++) {
        for (long long l = 0; l < (long long)(g[k].size()); l++) {
          sum[j][k] += dp[h - 1][g[k][l]][j];
          sum[j][k] %= mod;
        }
      }
    }
    for (long long i = 0; i < (long long)(n); i++) {
      for (long long j = 0; j < (long long)(n); j++) {
        long long res = 0;
        for (long long k = 0; k < (long long)(n); k++) {
          res = (res + dp[h - 1][i][k] * sum[j][k]) % mod;
        }
        dp[h][i][j] += res;
        dp[h][i][j] %= mod;
      }
    }
  }
  vector<long long> ans(n, 0);
  bool ok = false;
  for (long long h = 0; h < (long long)(64); h++) {
    vector<long long> res(n, 0);
    if (k & (1LL << h)) {
      if (!ok) {
        ok = true;
        for (long long i = 0; i < (long long)(n); i++) {
          for (long long j = 0; j < (long long)(n); j++) {
            ans[j] += dp[h][i][j];
            ans[j] %= mod;
          }
        }
        continue;
      }
      for (long long i = 0; i < (long long)(n); i++) {
        for (long long jj = 0; jj < (long long)(g[i].size()); jj++) {
          long long j = g[i][jj];
          for (long long k = 0; k < (long long)(n); k++) {
            res[k] += ans[i] * dp[h][j][k];
            res[k] %= mod;
          }
        }
      }
      ans = res;
    }
  }
  long long sum = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    sum += ans[i];
    sum %= mod;
  }
  cout << sum << '\n';
  return 0;
}