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
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long n, m, a, b, c, k, temp, x, y;
const int MAXN = 1e5 + 11, mod = 1e9 + 7;
inline long long max(long long a, long long b) { return ((a > b) ? a : b); }
inline long long min(long long a, long long b) { return ((a > b) ? b : a); }
inline vector<long long> read(int n) {
  vector<long long> v(n);
  for (int i = 0; i < v.size(); i++) cin >> v[i];
  return v;
}
int SZ;
struct matrix {
  vector<vector<long long>> arr;
  void reset() {
    arr.clear();
    arr.resize(n, vector<long long>(n, 0));
  }
  void makeiden() {
    reset();
    for (int i = 0; i < SZ; i++) arr[i][i] = 1;
  }
  matrix operator+(const matrix &o) const {
    matrix res;
    res.reset();
    for (int i = 0; i < SZ; i++) {
      for (int j = 0; j < SZ; j++) {
        res.arr[i][j] = (arr[i][j] + o.arr[i][j]) % mod;
      }
    }
    return res;
  }
  matrix operator*(const matrix &o) const {
    matrix res;
    res.reset();
    for (int i = 0; i < SZ; i++) {
      for (int j = 0; j < SZ; j++) {
        res.arr[i][j] = 0;
        for (int k = 0; k < SZ; k++) {
          res.arr[i][j] =
              (res.arr[i][j] + (arr[i][k] * o.arr[k][j]) % mod) % mod;
        }
      }
    }
    return res;
  }
};
long long f[100], cnt[3];
matrix power(matrix a, long long b) {
  matrix res;
  res.makeiden();
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
void sol() {
  cin >> n >> k;
  SZ = n;
  matrix T;
  T.reset();
  vector<long long> v = read(n);
  for (int i = 0; i < n; i++) {
    int bits = 0;
    for (int j = 0; j < 60; j++) {
      if ((1LL << j) & v[i]) bits++;
    }
    cnt[bits % 3]++;
    f[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      x = v[i] ^ v[j];
      int bits = 0;
      for (int b = 0; b < 60; b++) {
        if ((1LL << b) & x) bits++;
      }
      if (bits % 3 == 0) T.arr[i][j] = 1;
    }
  }
  T = power(T, k - 1);
  long long sum = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) sum += (f[j] * T.arr[i][j]) % mod, sum %= mod;
  cout << sum;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test = 1;
  for (int i = 1; i <= test; i++) sol();
}
