/* -*- coding: utf-8 -*- * * 2728.cc: No.2728 Grid Expansion - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 10; /* global variables */ char as[MAX_N][MAX_N + 4]; /* main */ int main() { int n, k; scanf("%d%d", &n, &k); for (int i = 0; i < n; i++) scanf("%s", as[i]); int nk = n * k; for (int i = 0; i < nk; i++) { for (int j = 0; j < nk; j++) putchar(as[i / k][j / k]); putchar('\n'); } return 0; }