#include #include using namespace std; int lin, col, l, c, x, l2, c2; char m[101][101], a[2001][2001]; int main () { #ifndef ONLINE_JUDGE freopen("test.in", "r", stdin); #endif cin >> lin >> col >> x; for (l = 1; l <= lin; l++) for (c = 1; c <= col; c++) cin >> m[l][c]; for (l = 1; l <= lin; l++) for (c = 1; c <= col; c++) { for (l2 = (l-1)*x+1; l2 <= l*x; l2++) for (c2 = (c-1)*x+1; c2 <= c*x; c2++) a[l2][c2] = m[l][c]; } for (l = 1; l <= lin*x; l++) { for (c = 1; c <= col*x; c++) cout << a[l][c] << ' '; cout << '\n'; } return 0; }