#include using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) using ll = long long; int main(){ ll n, a, b, c; cin >> n >> a >> b >> c; vector x{2, 1, 3}, y{b, a, c}; if(a < c) { swap(x[1], x[2]); swap(y[1], y[2]); } vector> v(n, vector(n)); int sts = 0; rep(i, 0, n) { rep(j, 0, n) { if(v[i][j]) continue; v[i][j] = x[sts]; y[sts]--; if(y[sts] == 0) { sts++; if(sts == 1 && i + 1 < n && j + 1 < n) { if(y[sts] > 1) { v[i][j + 1] = x[sts]; v[i + 1][j] = x[sts]; y[sts] -= 2; if(y[sts] == 0) sts++; } } } } } rep(i, 0, n) { rep(j, 0, n) cout << v[i][j]; cout << endl; } };