#include using namespace std; using ll = long long; #define fi first #define se second #define all(a) a.begin(),a.end() int main(){ int h,w; cin >> h >> w; vector a(h*w); for(int &i:a) cin >> i; sort(all(a)); for(int i=0; i