#include #include #include #include #include #include #include #include #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int w, h, x; cin >> w >> h >> x; if(w%3 == 2 && h%3 == 2){ if(x <= 36){ vector v(4); for(int i = 0; i < 4; i++){ v[i] = x/4+(x%4 > i ? 1 : 0); } for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(i%3 != 2 && j%3 != 2){ int idx = (i%3)*2+(j%3); cout << v[idx]; }else{ cout << 0; } } cout << endl; } }else{ cout << -1 << endl; } }else if(w%3 == 2){ if(x <= 18){ vector v(2); for(int i = 0; i < 2; i++){ v[i] = x/2+(x%2 > i ? 1 : 0); } for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(i%3 != 2 && i%3 != h%3 && j%3 != 2){ int idx = (j%3); cout << v[idx]; }else{ cout << 0; } } cout << endl; } }else{ cout << -1 << endl; } }else if(h%3 == 2){ if(x <= 18){ vector v(2); for(int i = 0; i < 2; i++){ v[i] = x/2+(x%2 > i ? 1 : 0); } for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(i%3 != 2 && j%3 != 2 && j%3 != w%3){ int idx = (i%3); cout << v[idx]; }else{ cout << 0; } } cout << endl; } }else{ cout << -1 << endl; } }else{ if(x <= 9){ for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(i%3 != 2 && i%3 != h%3 && j%3 != 2 && j%3 != w%3){ cout << x; }else{ cout << 0; } } cout << endl; } }else{ cout << -1 << endl; } } }