/* -*- coding: utf-8 -*- * * 3703.cc: No.3703 蝗櫁サ「 (Rotation) - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_H = 1000; const int MAX_W = 1000; /* typedef */ /* global variables */ char ss[MAX_H][MAX_W + 4]; /* subroutines */ /* main */ int main() { int h, w; scanf("%d%d", &h, &w); for (int i = 0; i < h; i++) scanf("%s", ss[i]); for (int i = 0; i < w; i++) { for (int j = 0; j < h; j++) putchar(ss[h - 1 - j][i]); putchar('\n'); } return 0; }