#include using namespace std; int main(){ int W, H, X; cin >> W >> H >> X; if (X == 0){ for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ cout << 0; if (j < W - 1){ cout << ' '; } } cout << endl; } } else { if (W % 3 != 2 || H % 3 != 2 || X > 36){ cout << -1 << endl; } else { vector> a(3, vector(3, 0)); a[0][0] = X / 4; a[0][1] = (X + 1) / 4; a[1][0] = (X + 2) / 4; a[1][1] = (X + 3) / 4; for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ cout << a[i % 3][j % 3]; if (j < W - 1){ cout << ' '; } } cout << endl; } } } }