#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint16_t N, K, i, j; cin >> N >> K; vector A(N, string()); for (i = 0; i != N; ++i) A[i].reserve(N), cin >> A[i]; for (i = 0; i != N * K; ++i) { for (j = 0; j != N * K; ++j) cout << A[i / K][j / K]; cout << '\n'; } return 0; }