#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, k, m;
cin >> n >> k >> m;
double a[n];
for (int i = 0; i < n; i++)
{
int b[k];
for (auto &c : b) cin >> c;
a[i] = accumulate(b, b + k, 0) - *max_element(b, b + k) - *min_element(b, b + k);
a[i] /= k - 2;
}
sort(a, a + n, greater<double>());
for (int i = m - 1; i >= 0; i--)
{
printf("%.3lf", a[i]);
if (i) cout << ' ';
}
return 0;
}