So you decided to hold a contest on Codeforces. You prepared the problems: statements, solutions, checkers, validators, tests... Suddenly, your coordinator asks you to change all your tests to multiple testcases in the easiest problem!

Initially, each test in that problem is just an array. The maximum size of an array is $k$. For simplicity, the contents of arrays don't matter. You have $n$ tests — the $i$-th test is an array of size $m_i$ ($1 \le m_i \le k$).

Your coordinator asks you to distribute all of your arrays into multiple testcases. Each testcase can include multiple arrays. However, each testcase should include no more than $c_1$ arrays of size greater than or equal to $1$ ($\ge 1$), no more than $c_2$ arrays of size greater than or equal to $2$, $\dots$, no more than $c_k$ arrays of size greater than or equal to $k$. Also, $c_1 \ge c_2 \ge \dots \ge c_k$.

So now your goal is to create the new testcases in such a way that:   each of the initial arrays appears in exactly one testcase;  for each testcase the given conditions hold;  the number of testcases is minimum possible. 

Print the minimum possible number of testcases you can achieve and the sizes of arrays included in each testcase.


-----Input-----

The first line contains two integers $n$ and $k$ ($1 \le n, k \le 2 \cdot 10^5$) — the number of initial tests and the limit for the size of each array.

The second line contains $n$ integers $m_1, m_2, \dots, m_n$ ($1 \le m_i \le k$) — the sizes of the arrays in the original tests.

The third line contains $k$ integers $c_1, c_2, \dots, c_k$ ($n \ge c_1 \ge c_2 \ge \dots \ge c_k \ge 1$); $c_i$ is the maximum number of arrays of size greater than or equal to $i$ you can have in a single testcase.


-----Output-----

In the first line print a single integer $ans$ ($1 \le ans \le n$) — the minimum number of testcases you can achieve.

Each of the next $ans$ lines should contain the description of a testcase in the following format:

$t$ $a_1$ $a_2$ $\dots$ $a_{t}$ ($1 \le t\le n$) — the testcase includes $t$ arrays, $a_i$ is the size of the $i$-th array in that testcase.

Each of the initial arrays should appear in exactly one testcase. In particular, it implies that the sum of $t$ over all $ans$ testcases should be equal to $n$.

Note that the answer always exists due to $c_k \ge 1$ (and therefore $c_1 \ge 1$).

If there are multiple answers, you can output any one of them.


-----Examples-----
Input
4 3
1 2 2 3
4 1 1

Output
3
1 2
2 1 3
1 2

Input
6 10
5 8 1 10 8 7
6 6 4 4 3 2 2 2 1 1

Output
2
3 8 5 7
3 10 8 1

Input
5 1
1 1 1 1 1
5

Output
1
5 1 1 1 1 1

Input
5 1
1 1 1 1 1
1

Output
5
1 1
1 1
1 1
1 1
1 1



-----Note-----

In the first example there is no way to distribute the tests into less than $3$ testcases. The given answer satisfies the conditions: each of the testcases includes no more than $4$ arrays of size greater than or equal to $1$ and no more than $1$ array of sizes greater than or equal to $2$ and $3$.

Note that there are multiple valid answers for this test. For example, testcases with sizes $[[2], [1, 2], [3]]$ would also be correct.

However, testcases with sizes $[[1, 2], [2, 3]]$ would be incorrect because there are $2$ arrays of size greater than or equal to $2$ in the second testcase.

Note the difference between the third and the fourth examples. You can include up to $5$ arrays of size greater than or equal to $1$ in the third example, so you can put all arrays into a single testcase. And you can have only up to $1$ array in the fourth example. Thus, every array should be included in a separate testcase.

Difficulty: interview

Starter code:

Solutions:
from collections import Counter
n, k = map(int, input().split())
m = sorted(list(map(int, input().split())), reverse=True)
c = [n] + list(map(int, input().split()))
cnt = Counter(m)
tmp = 0
size = 1
for i in range(k, 0, -1):
	tmp += cnt[i]
	size = max(size, (tmp-1)//c[i]+1)

ans = [[] for _ in range(size)]
for i, x in enumerate(m):
	ans[i%size].append(x)

print(size)
for a in ans:
	print(len(a), *a)

import sys
readline = sys.stdin.readline


N, K = list(map(int, readline().split()))
A = list(map(int, readline().split()))
C = [None] + list(map(int, readline().split()))
table = [0]*(K+1)
for a in A:
    table[a] += 1
for i in range(K-1, -1, -1):
    table[i] += table[i+1]
    
ok = N
ng = 0
while abs(ok-ng)>1:
    med = (ok+ng)//2
    if all(-(-table[k]//med) <= C[k] for k in range(1, K+1)):
        ok = med
    else:
        ng = med

A.sort(reverse = True)
Ans = [[] for _ in range(ok)]

for i in range(N):
    Ans[i%ok].append(A[i])      

sys.stdout.write('{}\n'.format(ok))
for i in range(ok):
    sys.stdout.write('{} '.format(len(Ans[i])))
    sys.stdout.write('{}\n'.format(' '.join(map(str, Ans[i]))))
    



n,k = list(map(int,input().split()))

m = list(map(int,input().split()))
c = list(map(int,input().split()))

mi = []
for i in range(n):
    mi.append([m[i],i])
mi.sort()
mi.reverse()

ans = [[]]

for loop in range(n):

    now,ind = mi[loop]

    l = -1
    r = len(ans)

    while r-l != 1:

        mid = (l+r)//2
        if len(ans[mid]) < c[now-1]:
            r = mid
        else:
            l = mid

    if r == len(ans):
        ans.append([now])
    else:
        ans[r].append(now)

print(len(ans))
for i in ans:
    print(len(i),*i)


from bisect import bisect_left as bl, bisect_right as br
N, K = list(map(int, input().split()))
M = sorted([int(a) for a in input().split()])[::-1]
C = [0] + [int(a) for a in input().split()]
ANS = [{}]
S = [0]
for m in M:
    a = br(S, -C[m])
    if a >= len(ANS):
        ANS.append({})
        S.append(0)
    if m not in ANS[a]:
        ANS[a][m] = 1
    else:
        ANS[a][m] += 1
    S[a] -= 1

print(len(ANS))
for ans in ANS:
    L = []
    for a in ans:
        L += [a] * ans[a]
    print(len(L), *L)


n, k = map(int, input().split())
m = list(map(int, input().split()))
c = list(map(int, input().split()))
m.sort()
count = 0
result = 0
for i in range(n):
    count += 1
    reqd = count//(c[m[~i] - 1])
    if count%(c[m[~i] - 1])!=0:
        reqd +=1
    result = max(result, reqd)

arrays = [[] for _ in range(result)]
count = [0] * k
for i in range(n):
    count[m[i] - 1] += 1
temp = 0

for i in range(k -1, -1, -1):
    
    for j in range(count[i]):
        
        arrays[temp%result].append(i + 1)
        temp += 1
    
print(result)
for arr in arrays:
    print(len(arr), *arr)

n, k = list(map(int, input().split()))
ms = sorted(list(map(int, input().split())))
cs = list(map(int, input().split()))

d = [0] * (k + 1)
for m in ms:
    d[m] += 1

sums = [0] * (k + 1)
sums[k] = d[k]
for i in range(k - 1, 0, -1):
    sums[i] = sums[i + 1] + d[i]

sums = sums[1:]
ans = -1
for i in range(k):
    ans = max(ans, (sums[i] + cs[i] - 1) // cs[i])

print(ans)
for i in range(ans):
    res = [str(ms[j]) for j in range(n - 1 - i, -1, -ans)]
    print(len(res), end=" ")
    print(" ".join(res))


n, k = list(map(int, input().split()))
m = list(map(int, input().split()))
c = list(map(int, input().split()))

num = [0]*(k+1)
for i in m:
    num[i] += 1

for i in range(k-1, -1, -1):
    num[i] += num[i+1]

num = num[1:]
maxi = 0
for i in range(k):
    maxi = max((num[i]-1)//c[i]+1, maxi)

ans = [[] for i in range(maxi)]
m.sort(reverse = True)
for i in range(len(m)):
    ans[i%maxi].append(m[i])

print(len(ans))
for i in range(maxi):
    print(" ".join(map(str, [len(ans[i])] + ans[i])))