intmain(){ cin >> n >> m >> k; for (int i = 1; i <= m; ++i) cin >> a[i]; sort(a + 1, a + m + 1); for (int o = 2; o <= n; ++o) { for (int i = 1; i <= m; ++i) cin >> b[i]; sort(b + 1, b + m + 1); while (!Q.empty()) Q.pop(); for (int i = 1; i <= m; ++i) Q.push(Queue(1, i)); for (int i = 1; i <= k; ++i) { Queue u = Q.top(); Q.pop(); c[i] = a[u.x] + b[u.y]; Q.push(Queue(u.x + 1, u.y)); } for (int i = 1; i <= k; ++i) a[i] = c[i]; } for (int i = 1; i <= k; ++i) cout << a[i] << " "; puts(""); return0; }