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>
using namespace std;
template <class T>
T Bitcnt(T a) {
  int sum = 0;
  while (a) {
    if (a & 1) sum++;
    a /= 2;
  }
  return sum;
}
template <class T>
T Max3(T a, T b, T c) {
  return max(a, max(b, c));
}
template <class T>
T Lcm(T a, T b) {
  T tmp = __gcd(a, b);
  return (a / tmp) * b;
}
template <class T>
T Pow(T a, T b) {
  T ans = 1;
  T base = a;
  while (b) {
    if (b & 1) ans = (ans * base);
    base = (base * base);
    b /= 2;
  }
  return ans;
}
long long Bigmod(long long a, long long b) {
  long long res = 1;
  long long pw = a % 1000000007LL;
  while (b > 0) {
    if (b & 1) res = (res * pw) % 1000000007LL;
    pw = (pw * pw) % 1000000007LL;
    b /= 2;
  }
  return res;
}
int a_x[] = {1, -1, 0, 0, 0};
int a_y[] = {0, 0, 1, -1, 0};
long long X, Y;
void extend_euclid(long long a, long long b) {
  if (b == 0) {
    X = a;
    Y = 0;
    return;
  }
  extend_euclid(b, a % b);
  long long x, y;
  x = Y;
  y = X - (a / b) * Y;
  X = x;
  Y = y;
}
long long inverse_modulo(long long a, long long b) {
  extend_euclid(a, b);
  return (X + 1000000007LL) % 1000000007LL;
}
struct Matrix {
  long long arr[105][105];
  int sz;
} Base;
Matrix mul(Matrix a, Matrix b) {
  Matrix ans;
  ans.sz = a.sz;
  int sz = a.sz;
  for (int i = 0; i <= sz; i++) {
    for (int j = 0; j <= sz; j++) {
      ans.arr[i][j] = 0;
      for (int k = 0; k <= sz; k++) {
        ans.arr[i][j] =
            (ans.arr[i][j] + (a.arr[i][k] * b.arr[k][j]) % 1000000007LL) %
            1000000007LL;
      }
    }
  }
  return ans;
}
Matrix exp(Matrix a, long long n) {
  Matrix ans;
  ans.sz = a.sz;
  int sz = a.sz;
  for (int i = 0; i <= sz; i++)
    for (int j = 0; j <= sz; j++) {
      if (i == j)
        ans.arr[i][j] = 1;
      else
        ans.arr[i][j] = 0;
    }
  while (n) {
    if (n & 1) ans = mul(ans, a);
    a = mul(a, a);
    n /= 2;
  }
  return ans;
}
long long arr[105];
int main() {
  long long n, k;
  scanf("%lld %lld", &n, &k);
  for (int i = 0; i <= n - 1; i++) scanf("%lld", &arr[i]);
  Base.sz = n - 1;
  for (int i = 0; i <= n - 1; i++) {
    for (int j = 0; j <= n - 1; j++) {
      long long tmp = arr[i] ^ arr[j];
      int num = 0;
      for (int k = 0; k <= 63; k++) {
        if (tmp & (1LL << k)) num++;
      }
      Base.arr[i][j] = 0;
      if (num % 3 == 0) Base.arr[i][j] = 1;
    }
  }
  if (k == 1) {
    printf("%d\n", n);
    return 0;
  } else {
    long long ans = 0;
    Matrix now = exp(Base, k - 1);
    for (int i = 0; i <= n - 1; i++)
      for (int j = 0; j <= n - 1; j++) {
        ans += now.arr[i][j];
        ans %= 1000000007LL;
      }
    cout << ans;
    return 0;
  }
  return 0;
}
