#D6989. Enumeration of Subsets III

    ID: 5804 Type: Default 2000ms 268MiB

Enumeration of Subsets III

Enumeration of Subsets III

You are given a set TT, which is a subset of SS. The set SS consists of 0,1,...n10, 1, ... n-1. Print all subsets of TT. Note that we represent 0,1,...n10, 1, ... n-1 as 00...0001, 00...0010, 00...0100, ..., 10...0000 in binary respectively and the integer representation of a subset is calculated by bitwise OR of existing elements.

Constraints

  • 1n281 \leq n \leq 28
  • 0k180 \leq k \leq 18
  • knk \leq n
  • 0bi<n0 \leq b_i < n

Input

The input is given in the following format.

nn k  b0  b1  ...  bk1k \; b_0 \; b_1 \; ... \; b_{k-1}

kk is the number of elements in TT, and bib_i represents elements in TT.

Output

Print the subsets ordered by their decimal integers. Print a subset in the following format.

dd: e0e_0 e1e_1 ...

Print ':' after the integer value dd, then print elements eie_i in the subset in ascending order. Separate two adjacency elements by a space character.

Example

Input

4 2 0 2

Output

0: 1: 0 4: 2 5: 0 2

inputFormat

Input

The input is given in the following format.

nn k  b0  b1  ...  bk1k \; b_0 \; b_1 \; ... \; b_{k-1}

kk is the number of elements in TT, and bib_i represents elements in TT.

outputFormat

Output

Print the subsets ordered by their decimal integers. Print a subset in the following format.

dd: e0e_0 e1e_1 ...

Print ':' after the integer value dd, then print elements eie_i in the subset in ascending order. Separate two adjacency elements by a space character.

Example

Input

4 2 0 2

Output

0: 1: 0 4: 2 5: 0 2

样例

4
2 0 2
0:

1: 0 4: 2 5: 0 2

</p>