#include #include #include using namespace std; int main() { int N, K; cin >> N >> K; vector B(N); for (string &t: B) cin >> t; vector> ans(N * K, vector(N * K, '.')); for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (B[i][j] == '#') { for (int k = i * K; k < i * K + K; k++) { for (int x = j * K; x < j * K + K; x++) { ans[k][x] = '#'; } } } } } for (const vector cs: ans) { for (char c: cs) { cout << c; } cout << endl; } return 0; }