Problem: General Payne has a battalion of n soldiers. The soldiers' beauty contest is coming up, it will last for k days. Payne decided that his battalion will participate in the pageant. Now he has choose the participants.

All soldiers in the battalion have different beauty that is represented by a positive integer. The value ai represents the beauty of the i-th soldier.

On each of k days Generals has to send a detachment of soldiers to the pageant. The beauty of the detachment is the sum of the beauties of the soldiers, who are part of this detachment. Payne wants to surprise the jury of the beauty pageant, so each of k days the beauty of the sent detachment should be unique. In other words, all k beauties of the sent detachments must be distinct numbers.

Help Payne choose k detachments of different beauties for the pageant. Please note that Payne cannot just forget to send soldiers on one day, that is, the detachment of soldiers he sends to the pageant should never be empty.

Input

The first line contains two integers n, k (1 ≤ n ≤ 50; 1 ≤ k ≤  <image>) — the number of soldiers and the number of days in the pageant, correspondingly. The second line contains space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 107) — the beauties of the battalion soldiers.

It is guaranteed that Payne's battalion doesn't have two soldiers with the same beauty.

Output

Print k lines: in the i-th line print the description of the detachment that will participate in the pageant on the i-th day. The description consists of integer ci (1 ≤ ci ≤ n) — the number of soldiers in the detachment on the i-th day of the pageant and ci distinct integers p1, i, p2, i, ..., pci, i — the beauties of the soldiers in the detachment on the i-th day of the pageant. The beauties of the soldiers are allowed to print in any order.

Separate numbers on the lines by spaces. It is guaranteed that there is the solution that meets the problem conditions. If there are multiple solutions, print any of them.

Examples

Input

3 3
1 2 3


Output

1 1
1 2
2 3 2


Input

2 1
7 12


Output

1 12 

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.Random;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            Random rand = new Random(1234);
            int n = in.readInt();
            int k = in.readInt();
            int[] a = IOUtils.readIntArray(in, n);
            Arrays.sort(a);
            int maxtot = (int) ArrayUtils.sumArray(a);
            ArrayList<ArrayList<Integer>> res;
            if (maxtot <= 50000) {
                res = solveSmall(n, k, a, maxtot);
            } else {
                res = solveRandom(rand, n, k, a);
            }
            if (res.size() != k) throw new RuntimeException();
            HashSet<Integer> checker = new HashSet<>();
            for (ArrayList<Integer> al : res) {
                int sum = 0;
                for (int val : al) sum += val;
                checker.add(sum);
            }
            if (checker.size() != k) throw new RuntimeException();
            if (checker.contains(0)) throw new RuntimeException();
            for (ArrayList<Integer> al : res) {
                out.print(al.size() + " ");
                for (int val : al) out.print((val) + " ");
                out.printLine();
            }
        }
        private ArrayList<ArrayList<Integer>> solveRandom(Random rand, int n, int k, int[] a) {
            HashSet<Integer> resset = new HashSet<>();
            ArrayList<ArrayList<Integer>> res = new ArrayList<>();
            boolean[] taken = new boolean[n];
            while (res.size() < k) {
                Arrays.fill(taken, false);
                for (int i = 0; i < n; i++) if (rand.nextBoolean()) taken[i] = true;
                int sum = 0;
                for (int i = 0; i < n; i++) if (taken[i]) sum += a[i];
                if (sum > 0 && !resset.contains(sum)) {
                    resset.add(sum);
                    ArrayList<Integer> temp = new ArrayList<>();
                    for (int i = 0; i < n; i++) if (taken[i]) temp.add(a[i]);
                    res.add(temp);
                }
            }
            return res;
        }
        private ArrayList<ArrayList<Integer>> solveSmall(int n, int k, int[] a, int maxtot) {
            boolean[][] can = new boolean[n + 1][maxtot + 1];
            int[][] previndex = new int[n + 1][maxtot + 1];
            ArrayUtils.fill(previndex, -1);
            can[0][0] = true;
            for (int index = 0; index < n; index++) {
                for (int total = 0; total <= maxtot; total++) {
                    if (can[index][total]) {
                        int ntotal = total + a[index];
                        if (!can[index + 1][ntotal]) {
                            can[index + 1][ntotal] = true;
                            previndex[index + 1][ntotal] = index;
                        }
                        if (!can[index + 1][total]) {
                            can[index + 1][total] = true;
                            previndex[index + 1][total] = previndex[index][total];
                        }
                    }
                }
            }
            ArrayList<ArrayList<Integer>> res = new ArrayList<>();
            for (int val = 1; val <= maxtot && res.size() < k; val++) {
                if (can[n][val]) {
                    ArrayList<Integer> temp = new ArrayList<>();
                    int curindex = n;
                    int curval = val;
                    while (curindex >= 0) {
                        if (curindex < n) temp.add(a[curindex]);
                        int pi = previndex[curindex][curval];
                        curindex = previndex[curindex][curval];
                        if (pi >= 0) curval -= a[pi];
                    }
                    res.add(temp);
                }
            }
            return res;
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }
        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static interface IntIterator {
        public int value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static class OutputWriter {
        private final PrintWriter writer;
        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }
        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }
        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }
        public void printLine() {
            writer.println();
        }
        public void close() {
            writer.close();
        }
    }
    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }
        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }
        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;
        public IntArray(int[] arr) {
            data = arr;
        }
        public int size() {
            return data.length;
        }
        public int get(int at) {
            return data[at];
        }
        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }
    }
    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);
        public abstract void removeAt(int index);
        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;
                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }
                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }
                public boolean isValid() {
                    return !removed && at < size();
                }
                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
    }
    static interface IntReversableCollection extends IntCollection {
    }
    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();
        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();
                public boolean hasNext() {
                    return it.isValid();
                }
                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
        default public long sum() {
            long result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result += it.value();
            }
            return result;
        }
    }
    static interface IntCollection extends IntStream {
        public int size();
    }
    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.readInt();
            return array;
        }
    }
    static class ArrayUtils {
        public static void fill(int[][] array, int value) {
            for (int[] row : array)
                Arrays.fill(row, value);
        }
        public static long sumArray(int[] array) {
            return new IntArray(array).sum();
        }
    }
}