#include <iostream>using namespace std; int v[1005][1005], n, m, k, cx, cy; void check_cy(){ cy++; if(cy > k * 2) cy = 1; cx = 0;} void check_cx(){ cx++; if(cx > k * 2) cx = 1;} int main(){ cin >> n >> m >> k; if(!(n % k) && !(m % k)) for(int i=1; i<=n; i++) { check_cy(); for(int j=1; j<=m; j++) { check_cx(); if(cy <= k) if(cx <= k) cout << 0; else cout << 1; else if(cx <= k) cout << 1; else cout << 0; } cout << '\n'; } else cout << "k trebuie sa fie divizor al lui n si al lui m.\n"; return 0;}