#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) int main() { int N, K; cin >> N >> K; vector A(N); rep(i, N) cin >> A[i]; rep(i, N) rep(ki, K) { rep(j, N) rep(kj, K) { cout << A[i][j]; } cout << endl; } return 0; }