#line 1 "codes/B.cpp" #include #line 1 "lib/core.hpp" // Library and Editor Setting is here: https://github.com/Nihonielse/competitive-library #ifndef CORE_FILE #define CORE_FILE #line 7 "lib/core.hpp" using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i, n) for (int i = 0; i < n; i++) #define rrep(i, n, s) for (int i = s; i < n; i++) #define vall(v) v.begin(), v.end() constexpr int INF = 1 << 30; constexpr int NEG_INF = -INF; constexpr ll LINF = 1ll << 62; constexpr ll NEG_LINF = -LINF; template inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; } template using min_priority_queue = priority_queue,greater>; #endif #line 1 "lib/inout.hpp" #line 5 "lib/inout.hpp" using namespace std; inline void yn(const bool &tf) { if(tf)cout<<"Yes"< istream& operator>>(istream& is,pair& pa){ is >> pa.first >> pa.second; return is; } template ostream& operator<<(ostream& os,pair& pa){ os << pa.first << " " << pa.second; return os; } template istream& operator>>(istream& is,vector& vec){ for(T& item:vec){ is >> item; } return is; } template ostream& operator<<(ostream& os,vector& vec){ for(int i=0;i ostream& operator<<(ostream& os,vector>& vec){ for(int i=0;i ostream& operator<<(ostream& os,vector>& vec){ for(int i=0;i>n>>k; vector a(n); cin>>a; string x; rep(i,k){ char m='9'; rep(j,n){ chmin(m,a[j][i]); } x+=m; } cout<