#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* #include using namespace atcoder; using mf_edge = mf_graph::edge; #include #include namespace mp = boost::multiprecision; */ /* #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") */ #define int long long #define endl "\n" #define ALL(v) v.begin(),v.end() #define m_p make_pair #define m_t make_tuple #define rep(i,n) for(int i=0; i<(int) (n); i++) using P = pair; using ld = long double; using ll = long long; using VI = vector; using VVI = vector>; using VVVI = vector>>; using VD = vector; using VP = vector>; using VVP = vector>>; using VC = vector; using VVC = vector>; template using invPQ = priority_queue, greater>; template using PQ = priority_queue; constexpr double pai = 3.14159265358979323846; constexpr int INF = 1070000000; constexpr long long LINF = 4611686015206162431; const long long mod = 998244353; const long long MOD = mod; constexpr double PI = 3.1415926; const vector ver = { 1,0,-1,0 }, sid{ 0,1,0,-1 }; struct edge { int to, cost; }; edge m_e(int xx, int yy) { edge ed; ed.to = xx; ed.cost = yy; return ed; } templatevoid vecin(vector& v) { for (int i = 0; i < (int)v.size(); i++) cin >> v[i]; } templatebool chmax(T& xx, T yy) { if (xx < yy) { xx = yy; return true; }return false; } templatebool chmin(T& xx, T yy) { if (xx > yy) { xx = yy; return true; }return false; } //ソートされた配列でx未満の要素の数を返す二分探索関数 int b_s(vector& vec, int xx) { return upper_bound(ALL(vec), xx) - vec.begin(); } int gcd(int xx, int yy) { if (yy > xx)swap(xx, yy); while (xx % yy != 0) { xx %= yy; swap(xx, yy); } return yy; } int lcm(int xx, int yy) { return (xx / gcd(xx, yy)) * yy; } bool prime(int xx) {//O(sqrt(N)) if (xx <= 1)return 0; for (int i = 2; i * i <= xx; i++) { if (xx % i == 0)return 0; } return 1; } int ceilinv(int xx, int yy) { assert(yy); if (xx % yy == 0)return xx / yy; else return xx / yy + 1; } templateclass slow_segment_tree { struct node { T sum; node* child[2]; }; node* root = NULL; int depth = 0; void make_node(node*& n, int d) { n = new node; if (d > 1) { make_node(n.child[0], d - 1); make_node(n.child[1], d - 1); } } void set_sub(node np, int& x, T n,int p) {//ポインタ 位置 変更する数値 深さ } T prod_sub(node np, int r, int l, int& a, int& b) { } slow_segment_tree(int N) { while ((1U << depth) < (unsigned int)(N)) depth++; make_node(root, depth); } void set(int x, T n) { } T prod(int r,int l) {// [r, l) } }; signed main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); int H, W, X; cin >> H >> W >> X; VVI vec(H, VI(W)); if (H % 3 != 2 || W % 3 != 2||X>36) { cout << -1 << endl; return 0; } for (int i = 1; i < H; i += 3) { for (int j = 1; j < W; j += 3) { vec[i][j] = max(0ll,min(X, 9ll)); vec[i][j - 1] = max(0ll,min(X - 9, 9ll)); vec[i - 1][j] = max(0ll,min(X - 18, 9ll)); vec[i - 1][j - 1] = max(0ll , min(X - 27, 9ll)); } } rep(i, H) { rep(j, W) { cout << vec[i][j]; } cout << endl; } }