#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; typedef long long ll; typedef vector vi; typedef pair pii; #define MP make_pair #define PB push_back #define inf 1000000007 #define rep(i,n) for(int i = 0; i < (int)(n); ++i) #define all(x) (x).begin(),(x).end() template void Fill(A (&array)[N], const T &val){ std::fill( (T*)array, (T*)(array+N), val ); } template inline bool chmax(T &a, T b){ if(a inline bool chmin(T &a, T b){ if(a>b){ a = b; return true; } return false; } int a[2][2]; bool f[2][2]; int res[601][601]; int main(){ int n,m,x; cin >> n >> m >> x; rep(i,2)rep(j,2)f[i][j] = 1; if(n%3==0){ f[0][0] = 0; f[0][1] = 0; }else if(n%3==1){ f[1][0] = 0; f[1][1] = 0; } if(m%3==0){ f[0][0] = 0; f[1][0] = 0; }else if(m%3==1){ f[0][1] = 0; f[1][1] = 0; } rep(i,2){ rep(j,2){ if(f[i][j]){ if(x>=9){ a[i][j] = 9; x-= 9; }else{ a[i][j] = x; x-= x; } } } } if(x!=0){ cout << -1 << endl; return 0; } rep(i,n){ rep(j,n){ if(i%3==2||j%3==2){ cout << 0; }else{ cout << a[i%3][j%3]; } } cout << "\n"; } return 0; }