#include int main() { using namespace std; cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) cout << (i < j ? 2 : i == j && 2 * i < n ? 1 : 0); cout << '\n'; } }