#include using namespace std; //#define int long long #define REP(i,m,n) for(int i=(m);i<(n);i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define all(a) a.begin(),a.end() #define rall(c) (c).rbegin(),(c).rend() #define mp make_pair #define endl '\n' #define vec vector #define mat vector > #define fi first #define se second #define double long double typedef long long ll; typedef unsigned long long ull; typedef pair pll; //typedef long double ld; typedef complex Complex; const ll INF=1e9+7; const ll inf=INF*INF; const ll mod=1e9+7; const ll MAX=140010; signed main(){ ll w,h,x;cin>>w>>h>>x; vector >ans(h+1,vector(w+1)); if(h==1){ if(x>18){ cout<<-1<9){ vectorans(w); ans[0]=9; ans[1]=x-9; REP(i,3,w){ ans[i]=ans[i-3]; } rep(i,w)cout<ans(w); ans[0]=x; REP(i,3,w){ ans[i]=ans[i-3]; } rep(i,w)cout<18){ cout<<-1<9){ vectorans(w); ans[0]=9; ans[1]=x-9; REP(i,3,w){ ans[i]=ans[i-3]; } rep(i,w)cout<ans(w); ans[0]=x; REP(i,3,w){ ans[i]=ans[i-3]; } rep(i,w)cout<36){ cout<<-1< >ans(h,vector(w)); if(x>9){ ans[0][0]=9; x-=9; }else{ ans[0][0]=x; x=0; } if(x>9){ ans[1][0]=9; x-=9; }else{ ans[1][0]=x; x=0; } if(x>9){ ans[0][1]=9; x-=9; }else{ ans[0][1]=x; x=0; } if(x>9){ ans[1][1]=9; x-=9; }else{ ans[1][1]=x; x=0; } rep(i,2){ REP(j,3,w){ ans[i][j]=ans[i][j-3]; } } REP(i,3,h){ rep(j,w){ ans[i][j]=ans[i-3][j]; } } rep(i,h){ rep(j,w){ cout<