#include using namespace std; typedef long long ll; typedef pair P; #define p_ary(ary,a,b) do { cout << "["; for (int count = (a);count < (b);++count) cout << ary[count] << ((b)-1 == count ? "" : ", "); cout << "]\n"; } while(0) #define p_map(map,it) do {cout << "{";for (auto (it) = map.begin();;++(it)) {if ((it) == map.end()) {cout << "}\n";break;}else cout << "" << (it)->first << "=>" << (it)->second << ", ";}}while(0) templateostream& operator<<(ostream& os,const pair& a) {os << "(" << a.first << ", " << a.second << ")";return os;} const char newl = '\n'; int main() { int h,w,s; cin >> w >> h >> s; int x = 0,y = 0,szx = 1,szy = 1; if (h%3 == 0) x = 1; else if (h%3 == 2) szx = 2; if (w%3 == 0) y = 1; else if (w%3 == 2) szy = 2; if (szx*szy*9 < s) { cout << -1 << newl; return 0; } vector> ans(h+2,vector(w+2,0)); for (int i = x;i < h;i += 3) for (int j = y;j < w;j += 3) { int ss = s; for (int k = 0;k < 3;++k) for (int l = 0;l < 3;++l) if (k < szx && l < szy) { ans[i+k][j+l] = min(9,ss); ss -= min(9,ss); } } for (int i = 0;i < h;++i) { for (int j = 0;j < w;++j) cout << ans[i][j]; cout << newl; } }