#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k, m;
cin >> n >> k >> m;
vector<double> all;
for (int i = 0; i < n; i++) {
vector<int> v(k);
for (int i = 0; i < k; i++) {
cin >> v[i];
}
int acc = accumulate(v.begin(), v.end(), 0);
int mx = *max_element(v.begin(), v.end());
int mn = *min_element(v.begin(), v.end());
all.push_back(1.0 * (acc - mx - mn) / (k - 2));
}
sort(all.begin(), all.end());
for (int i = n - m; i < n; i++) {
cout << fixed << setprecision(3) << all[i] << " "[i == n - 1];
}
return 0;
}