//* #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") //*/ #include // #include using namespace std; // using namespace atcoder; #define DEBUG(x) cerr<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair #define pll pair template pair operator+(const pair &s, const pair &t) { return pair(s.first + t.first, s.second + t.second); } template pair operator-(const pair &s, const pair &t) { return pair(s.first - t.first, s.second - t.second); } template ostream& operator<<(ostream& os, pair p) { os << "(" << p.first << ", " << p.second << ")"; return os; } #define X first #define Y second #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--) #define rrep1(i,n) for(int i=(int)(n);i>0;i--) #define REP(i,a,b) for(int i=a;i bool chmax(T &a, const T &b) { if (a bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; } #define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end()); const ll inf = 1000000001; const ll INF = (ll)1e18 + 1; const long double pi = 3.1415926535897932384626433832795028841971L; int popcount(ll t) { return __builtin_popcountll(t); } // int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; // int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 }; vi dx = {0, 1, 0, -1}, dy = {-1, 0, 1, 0}; // vi dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 }; struct Setup_io { Setup_io() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); cout << fixed << setprecision(25); } } setup_io; const ll MOD = 1000000007; // const ll MOD = 998244353; // #define mp make_pair //#define endl '\n' vii solve(int h, int w, int x, vii temp) { vii a(h, vi(w)); rep (i, h) rep (j, w) { a[i][j] = temp[i % 3][j % 3]; } rep (i, h) rep (j, w) { int s = 0; REP (k1, -1, 2) REP (k2, -1, 2) { int ni = i + k1, nj = j + k2; if (in(ni, 0, h) and in(nj, 0, w)) { s += a[ni][nj]; } } if (s != x) return vii(0); } return a; } signed main() { int w, h, x; cin >> w >> h >> x; vii temp(3, vi(3)); rep (i, 10) rep (j, 10) rep (k, 10) rep (l, 10) { if (i + j + k + l != x) continue; temp[0][0] = i; temp[0][1] = j; temp[1][0] = k; temp[1][1] = l; vii a = solve(h, w, x, temp); if (a.size() == h) { rep (i, h) { rep (j, w) { cout << a[i][j]; } cout << endl; } return 0; } } cout << -1 << endl; }