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 bool SR(int &x) { return scanf("%d", &x) == 1; }
inline bool SR(long long &x) { return scanf("%lld", &x) == 1; }
inline bool SR(double &x) { return scanf("%lf", &x) == 1; }
inline bool SR(char *s) { return scanf("%s", s) == 1; }
inline bool RI() { return true; }
template <typename I, typename... T>
inline bool RI(I &x, T &...tail) {
  return SR(x) && RI(tail...);
}
inline void SP(const int x) { printf("%d", x); }
inline void SP(const long long x) { printf("%lld", x); }
inline void SP(const double x) { printf("%.16lf", x); }
inline void SP(const char *s) { printf("%s", s); }
inline void PL() { puts(""); }
template <typename I, typename... T>
inline void PL(const I x, const T... tail) {
  SP(x);
  if (sizeof...(tail)) putchar(' ');
  PL(tail...);
}
template <typename I>
void _DOING(const char *s, I &&x) {
  cerr << s << " = " << x << endl;
}
template <typename I, typename... T>
void _DOING(const char *s, I &&x, T &&...tail) {
  int c = 0;
  while (*s != ',' || c != 0) {
    if (*s == '(' || *s == '[' || *s == '{') c++;
    if (*s == ')' || *s == ']' || *s == '}') c--;
    cerr << *s++;
  }
  cerr << " = " << x << " , ";
  _DOING(s + 1, tail...);
}
inline int RAND() {
  static int x = 880301;
  return (x = x * 0xdefaced + 1) & 0x7fffffff;
}
const int MAX_N = 100 + 10;
const long long MOD = 1000000000 + 7;
struct Matrix {
  long long a[MAX_N][MAX_N];
  int r, c;
  Matrix(int _r = 0, int _c = 0) : r(_r), c(_c) {
    for (int i = 0; i < int(_r); i++) {
      for (int j = 0; j < int(_c); j++)
        if (i == j)
          a[i][j] = 1;
        else
          a[i][j] = 0;
    }
  }
};
inline Matrix operator*(const Matrix &a, const Matrix &b) {
  Matrix c(a.r, b.c);
  memset(c.a, (0), sizeof(c.a));
  ;
  for (int k = 0; k < int(a.c); k++) {
    for (int i = 0; i < int(a.r); i++) {
      for (int j = 0; j < int(b.c); j++)
        (c.a[i][j] += (a.a[i][k] * b.a[k][j]) % MOD) %= MOD;
    }
  }
  return c;
}
inline Matrix power(Matrix a, long long n) {
  Matrix x(a.r, a.c);
  while (n) {
    if (n & 1) x = x * a;
    a = a * a;
    n >>= 1;
  }
  return x;
}
Matrix mat;
long long a[MAX_N];
int main() {
  int n;
  long long k;
  RI(n, k);
  for (int i = 0; i < int(n); i++) RI(a[i]);
  if (k == 1) {
    PL(n);
    return 0;
  }
  mat = Matrix(n, n);
  memset(mat.a, (0), sizeof(mat.a));
  ;
  for (int i = 0; i < int(n); i++) {
    for (int j = 0; j < int(n); j++) {
      if (__builtin_popcountll(a[i] ^ a[j]) % 3 == 0) mat.a[i][j] = 1;
    }
  }
  Matrix x = power(mat, k - 1);
  long long ans = 0;
  for (int i = 0; i < int(n); i++) {
    for (int j = 0; j < int(n); j++) ans = (ans + x.a[i][j]) % MOD;
  }
  PL(ans);
  return 0;
}