CSES - K Subset Sums I
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given an array of nn integers. Consider the sums of all 2n2^n subsets of the given array (including the empty subset with sum equal to zero).

Your task is to find the kk smallest subset sums.

Input

The first line has two integers nn and kk: the size of the array and the number of subset sums kk.

The next line has nn integers x1,x2,,xnx_1, x_2,\dots, x_n: the contents of the array.

Output

Print kk integers: the kk smallest subset sums in increasing order.

Constraints

  • 1n21051 \le n \le 2 \cdot 10^5
  • 1kmin(2n,2105)1 \le k \le \min(2^n, 2 \cdot 10^5)
  • 109xi109-10^9 \le x_i \le 10^9

Example

Input:

4 9
1 6 3 -3

Output:

-3 -2 0 0 1 1 3 3 4