One day Ms Swan bought an orange in a shop. The orange consisted of *n*·*k* segments, numbered with integers from 1 to *n*·*k*. 

There were *k* children waiting for Ms Swan at home. The children have recently learned about the orange and they decided to divide it between them. For that each child took a piece of paper and wrote the number of the segment that he would like to get: the *i*-th (1 ≤ *i* ≤ *k*) child wrote the number *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *n*·*k*). All numbers *a*<sub class="lower-index">*i*</sub> accidentally turned out to be different.

Now the children wonder, how to divide the orange so as to meet these conditions:
 -  each child gets exactly *n* orange segments; -  the *i*-th child gets the segment with number *a*<sub class="lower-index">*i*</sub> for sure; -  no segment goes to two children simultaneously. 
Help the children, divide the orange and fulfill the requirements, described above.
The first line contains two integers *n*, *k* (1 ≤ *n*, *k* ≤ 30). The second line contains *k* space-separated integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*k*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *n*·*k*), where *a*<sub class="lower-index">*i*</sub> is the number of the orange segment that the *i*-th child would like to get.

It is guaranteed that all numbers *a*<sub class="lower-index">*i*</sub> are distinct.
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <iomanip>
#include <math.h>
#include <limits.h>
#include <string>
#include <bitset>

using namespace std;

#define pb push_back
#define mp make_pair
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define manytests int TT;cin >> TT; while (TT--)

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define FORd(i,a,b) for (int i = (a); i >= (b); --i)

int dx[8] = {-1, 1, 0, 0, 1, 1, -1, -1}, dy[8] = {0, 0, 1, -1, 1, 1, -1, -1};

#define ll long long
#define ld long double
#define fi first
#define se second
#define rev reverse

#define vi vector<int>
#define vl vector<ll>
#define vc vector<char>
#define vd vector<double>
#define vs vector<string>
#define vld vector<ld>
#define vb vector<bool>
#define vvi vector<vi>
#define pii pair<int, int>
#define vpi vector<pii>

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

	// freopen("socdist1.in", "r", stdin);
	// freopen("socdist1.out", "w", stdout);

    int n, k;
    cin >> n >> k;
    unordered_set<int> st;
    vvi kids(k);
    FOR(i,0,k) {
        int x;
        cin >> x;
        kids[i].pb(x);
        st.insert(x);
    }
    FOR(i,1,n*k+1) {
        if (st.find(i)==st.end()) kids[0].pb(i);
    }
    for (auto v : kids) {
        for (int x : v) cout << x << " ";
        cout << "\n";
    }

    return 0;
}