include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
const int M = 110;
int a[M][M];
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++) {//循环赋初值
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
for (int j = 0; j < m; j++) {
for (int i = n - 1; i >=0; i--){
cout << a[i][j]<<' ';
}
cout << endl;
}
return 0;
}