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;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long b[1000012], t, n, m, k, ccnt,
    pos = 0, sum = 0, minn2 = INT_MAX, sum2, cnt = 0, cnt1 = 0, cnt2 = 0, x, y,
    cnt3 = 0, cnt4 = 0, cnt5 = 0, cnt6 = 0, cnt7 = 0, a[1000005], a2[1000005],
    x1, y7, x2, y2, x3, y3, bbb;
long long c[1000005], z, d, l2, r2, temcnt, le[1000005], ri[1000005],
    ok[2000005], cl, cr, gan, fst, pre[1000005], mxl[1000005], mxr[1000005],
    uu[100005], vv[100005];
long long pos1 = 0, pos2 = 0, tem, tem2, l, r, ans, mod = 998244353, tw[100005],
          th[100005], ee, loc[1000005], te[100005], vis[1000005], ne[200005],
          pr[200005];
long long minn = LONG_MAX, maxx2, posb, mid;
long long c10, c11, c20, c21, dp[155][155], ans1, ans2, maxx, dis[155][155],
    edge[155][155], matrix1[105][105], matrix2[105][105], matrix3[105][105],
    dist[155];
bool ia, ib;
string s1, s, s2, s3, t1, t2, ss[105];
vector<long long> v[1000005];
pair<pair<long long, long long>, long long> p[1000005];
pair<long long, long long> p1, p2;
map<pair<long long, long long>, long long> mp;
long long fpow(long long aa, long long bb) {
  if (bb == 0) {
    return 1;
  } else if (bb < 0) {
    return 0;
  }
  long long kk1 = aa;
  long long kk2 = 1;
  while (bb > 1) {
    if (bb % 2) {
      kk2 *= kk1;
      kk2 %= mod;
    }
    kk1 *= kk1;
    kk1 %= mod;
    bb = bb / 2;
  }
  return (kk1 * kk2) % mod;
}
long long co(long long x, long long y) {
  long long ans = 1;
  long long ans2 = 1;
  if (x == y || y == 0) {
    return 1;
  } else {
    for (long long i = x - y + 1; i <= x; i++) {
      ans = ans * i;
      ans = ans % mod;
    }
    for (long long i = 1; i <= y; i++) {
      ans2 = ans2 * i;
      ans2 = ans2 % mod;
    }
    ans2 = fpow(ans2, mod - 2);
    ans2 = (ans2 * ans) % mod;
    return ans2;
  }
}
long long summ(long long x) {
  long long ans = 0, pos = 0;
  long long maxx;
  x++;
  long long xx = x;
  for (long long i = 0;; i++) {
    if (tw[i] > x) {
      maxx = i;
      break;
    }
  }
  for (long long i = maxx - 1; i >= 0; i--) {
    if (xx >= tw[i]) {
      th[i] = 1;
      xx -= tw[i];
    } else {
      th[i] = 0;
    }
  }
  for (long long i = maxx - 1; i >= 0; i--) {
    if (th[i]) {
      ans += v[i][pos];
      pos = 2 * pos + 2;
    } else {
      pos *= 2;
    }
  }
  return ans;
}
void modify(long long x, long long m) {
  v[0][x] += m;
  for (long long i = 1; i <= cnt2; i++) {
    v[i][x / 2] += m;
    x /= 2;
  }
}
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  tw[0] = 1;
  for (long long i = 1; i <= 61; i++) {
    tw[i] = tw[i - 1] * 2;
  }
  mod = 1000000007;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < n; j++) {
      x = a[i] ^ a[j];
      cnt = 0;
      for (long long kk = 60; kk >= 0; kk--) {
        if (x >= tw[kk]) {
          x -= tw[kk];
          cnt++;
        }
      }
      if (cnt % 3 == 0) {
        edge[i][j] = 1;
      }
    }
  }
  if (k == 1) {
    cout << n;
  } else {
    k--;
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        if (i == j) {
          matrix1[i][j] = 1;
        }
      }
    }
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        matrix2[i][j] = edge[i][j];
      }
    }
    while (k > 1) {
      if (k % 2) {
        for (long long i = 0; i < n; i++) {
          for (long long j = 0; j < n; j++) {
            matrix3[i][j] = 0;
            for (long long kk = 0; kk < n; kk++) {
              matrix3[i][j] += matrix1[i][kk] * matrix2[kk][j];
              matrix3[i][j] %= mod;
            }
          }
        }
        for (long long i = 0; i < n; i++) {
          for (long long j = 0; j < n; j++) {
            matrix1[i][j] = matrix3[i][j];
          }
        }
      }
      for (long long i = 0; i < n; i++) {
        for (long long j = 0; j < n; j++) {
          matrix3[i][j] = 0;
          for (long long kk = 0; kk < n; kk++) {
            matrix3[i][j] += matrix2[i][kk] * matrix2[kk][j];
            matrix3[i][j] %= mod;
          }
        }
      }
      for (long long i = 0; i < n; i++) {
        for (long long j = 0; j < n; j++) {
          matrix2[i][j] = matrix3[i][j];
        }
      }
      k /= 2;
    }
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        matrix3[i][j] = 0;
        for (long long kk = 0; kk < n; kk++) {
          matrix3[i][j] += matrix1[i][kk] * matrix2[kk][j];
          matrix3[i][j] %= mod;
        }
        ans += matrix3[i][j];
        ans %= mod;
      }
    }
    cout << ans;
  }
}