#include using namespace std; int main() { int n, m, x, posx, posy; int a[100][100]; cin >> n >> m >> x; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> a[i][j]; } } for (int i = 0; i < n * x; i++) { posx = i / x; for (int j = 0; j < m * x; j++) { posy = j / x; cout << a[posx][posy] << " "; } cout << endl; } return 0; }