#include using namespace std; using ll = long long; using ld = long double; using vl = vector; template using vc = vector; template using vvc = vector>; #define eb emplace_back #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (n); i++) #define repr(i, n) for (ll i = (n)-1; i >= 0; i--) #define repe(i, l, r) for (ll i = (l); i < (r); i++) #define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--) #define repa(i,n) for (auto& i: n) template inline bool chmax(T1 &a, const T2 &b) {if (a inline bool chmin(T1 &a, const T2 &b) {if (b void verr(const set &st) { repa(a, st) cerr << a << " "; cerr << endl; } template void verr(const map &mp) { repa(a, mp) cerr << "{" << a.first << ", " << a.second << "} "; cerr << endl; } template void verr(const vector>& a, const N& n) { rep(i, n) cerr << "{" << a[i].first << ", " << a[i].second << "} "; cerr << endl; } template void verr(const vector& a, const N& n) { rep(i, n) cerr << a[i] << " "; cerr << endl; } ll dbgt = 1; void err() { cerr << "passed " << dbgt++ << endl; } template void err(H&& h,T&&... t){ cerr<< h << (sizeof...(t)?" ":"\n") << flush; if(sizeof...(t)>0) err(forward(t)...); } #endif const ll INF = 4e18; const ld EPS = 1e-11; const ld PI = acos(-1.0L); const ll MOD = 1e9 + 7; // const ll MOD = 998244353; //--------------------------------------------------------------------------------// int main() { ll W, H, X; cin >> W >> H >> X; if(X > 36) { cout << -1 << endl; return 0; } ll C = (X + 8) / 9; vc ans(H, string(W, '0')); if(C == 1){ if(H == 1 and W == 1){ cout << X << endl; return 0; } ll dh = (H % 3 == 0 ? 1 : 0), dw = (W % 3 == 0 ? 1 : 0); for (ll h = dh; h < H; h+=3){ for (ll w = dw; w < W; w+=3){ ans[h][w] = '0' + X; } } }else if(C == 2){ if(!((H % 3 == 2 and W % 3 != 0) or (W % 3 == 2 and H % 3 != 0))){ cout << -1 << endl; return 0; } ll a = 9, b = X - 9; // err(a, b); for (ll h = 0; h < H; h+=3){ for (ll w = 0; w < W; w+=3){ if(H % 3 == 2) ans[h][w] = '0' + a, ans[h + 1][w] = '0' + b; else ans[h][w] = '0' + a, ans[h][w + 1] = '0' + b; } } }else{ if(H % 3 != 2 or W % 3 != 2){ cout << -1 << endl; return 0; } ll a = 9, b = 9, c = (X - 18) / 2, d = X - a - b - c; for (ll h = 0; h < H; h += 3){ for (ll w = 0; w < W; w+=3){ ans[h][w] = '0' + a, ans[h + 1][w] = '0' + b, ans[h][w + 1] = '0' + c, ans[h + 1][w + 1] = '0' + d; } } } rep(i, H) cout << ans[i] << '\n'; }