{"trustable":false,"sections":[{"title":"Description","value":{"format":"MD","content":"You’re given $k$ arrays, each array has $k$ integers. There are $k^k$ ways to pick exactly one element in each array and calculate the sum of the integers. Your task is to find the $k$ smallest sums among them.\n"}},{"title":"Input","value":{"format":"MD","content":"There will be several test cases. The first line of each case contains an integer $k (2 \\le k \\le 750)$. Each of the following $k$ lines contains k positive integers in each array. Each of these integers does not exceed 1,000,000. The input is terminated by end-of-file (EOF).\n"}},{"title":"Output","value":{"format":"MD","content":"For each test case, print the k smallest sums, in ascending order."}},{"title":"Sample Input","value":{"format":"MD","content":"```\n3\n1 8 5\n9 2 5\n10 7 6\n2\n1 1\n1 2\n```"}},{"title":"Sample Output","value":{"format":"MD","content":"```\n9 10 12\n2 2\n```"}}]}