#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int n, a, b, c; cin >> n >> a >> b >> c; if (a + c <= b) { rep(i, n) { rep(j, n) { if (a) { cout << '1'; a--; } else if (b) { cout << '2'; b--; } else { cout << '3'; c--; } } cout << endl; } } else { if (a < c) { rep(i, n) { rep(j, n) { if (b) { cout << '2'; b--; } else if (c) { cout << '3'; c--; } else { cout << '1'; a--; } } cout << endl; } } else { rep(i, n) { rep(j, n) { if (b) { cout << '2'; b--; } else if (a) { cout << '1'; a--; } else { cout << '3'; c--; } } cout << endl; } } } return 0; }