You are given arrays, each containing integers. There are k^k ways to choose exactly one element from each array and calculate their sum. Your task is to find the smallest sums among these possible sums.
The input consists of several test cases. The first line of each test case contains an integer (2 \leq k \leq 750). Each of the following lines contains positive integers describing one array. Each integer does not exceed .
For each test case, print the smallest sums in ascending order, one per line.
Example 1