#include #include #include #include #include #include #include #include #include #include #include static const int MOD = 998244353; using ll = long long; using uint = unsigned; using ull = unsigned long long; using namespace std; template constexpr T INF = ::numeric_limits::max() / 32 * 15 + 208; string g[10]; int main() { int n, k; cin >> n >> k; for (int i = 0; i < n; ++i) { cin >> g[i]; } for (int i = 0; i < n * k; ++i) { for (int j = 0; j < n * k; ++j) { cout << g[i/k][j/k]; } cout << "\n"; } cout << "\n"; return 0; }