#include #define pb push_back #define mp make_pair #define mt make_tuple #define ll long long #define pii pair #define tii tuple #define N 200005 #define mod 1000000005 #define X first #define Y second #define eps 0.0000000001 #define all(x) x.begin(),x.end() #define tot(x) x+1,x+n+1 using namespace std; int a[110], i, j, k, l, m, n, x; int main() { cin.sync_with_stdio(false); cout.sync_with_stdio(false); cin >> n >> m >> x; for(i = 1; i <= n; i++) { for(j = 0; j < m; j++) cin >> a[j]; for(k = 1; k <= x; k++) { for(l = 0; l < j * x; l++) cout << a[l / x] << ' '; cout << '\n'; } } return 0; }