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
import java.io.*;
import java.util.*;
import java.math.*;

public class E691 {

    public static BufferedReader read = null;
    public static PrintWriter out = null;
    public static StringTokenizer token = null;


    public static void solve()
    {
        int n = nint();
        long k = nlong();
        long mod = 7 + (long)(1e9);
        long[] a = nlarr(n);

        if(k == 1)
        {
            out.println(n%mod);
            return;
        }
        long[][] mat = new long[n][n];
        for(int i=0; i<n; i++)
        {
            for(int j=0; j<n; j++)
            {
                long x = a[i] ^ a[j];
                int ct = Long.bitCount(x);
                if(ct%3 == 0)
                {
                    mat[i][j] = 1;
                }
            }
        }
        Matrix.mod = mod;
        mat = Matrix.powmod(mat, k-1);
        long ans = 0;
        for(int i=0; i<n; i++)
        {
            for(int j =0; j<n; j++)
            {
                ans += mat[i][j];
                ans%=mod;
            }
        }
        out.println(ans);
    }

    public static void main(String[] args)
    {
        read = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.flush();
        out.close();

    }

    // i/o functions
    public static String next() // returns the next string
    {
        while(token == null || !token.hasMoreTokens())
        {
            try {
                token = new StringTokenizer(read.readLine());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        return token.nextToken();
    }

    public static int nint()
    {
        return Integer.parseInt(next());
    }
    public static long nlong()
    {
        return Long.parseLong(next());
    }
    public static double ndouble()
    {
        return Double.parseDouble(next());
    }
    public static int[] narr(int n)
    {
        int[] a = new int[n];
        for(int i=0; i<n; i++) a[i] = nint();
        return a;
    }

    public static long[] nlarr(int n)
    {
        long[] a = new long[n];
        for(int i=0; i<n; i++) a[i] = nlong();
        return a;
    }


}


class Matrix {

    public static long mod = Long.MAX_VALUE;
    public long[][] mat = null;
    public Matrix(long[][] in)
    {
        //assume it's rectangular
        mat = new long[in.length][0];
        for(int i=0; i<in.length; i++)
        {
            mat[i] = new long[in[i].length];
            for (int j = 0; j < in[i].length; j++)
            {
                mat[i][j] = in[i][j];
            }
        }

    }
    public static long[][] I(int s)
    {
        long[][] id = new long[s][s];
        for(int i=0; i<s; i++) id[i][i] = 1;
        return id;
    }
    public long[][] mult(Matrix b)
    {
        return mult(this.mat, b.mat);
    }

    public long[][] mult(long[][] b)
    {
        return mult(this.mat, b);
    }

    public static long[][] mult(long[][] a, long[][] b)
    {
        return multmod(a, b);
    }

    public static long[][] multmod(long[][] a, long[][] b)
    {
        long[][] c = new long[a.length][b[0].length];
        for(int i=0; i<a.length; i++)
        {
            for(int j = 0; j<b[0].length; j++)
            {
                for(int k = 0; k<a[0].length; k++)
                {
                    c[i][j] = (c[i][j] + a[i][k]*b[k][j]) % mod;

                }
            }
        }
        return c;
    }

    public long[][] powmod(long e, long m)
    {
        this.mod=mod;
        return powmod(this.mat, e);
    }
    public static long[][] powmod(long[][] a, long e)
    {
        if(e == 0) return I(a.length);
        if(e == 1) return a;
        long[][] c = powmod(a, e/2);
        c = multmod(c,c);
        if(e%2 == 1) c = multmod(c, a);
        return c;

    }
}