#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; for (int row = 1; row <= n; row++) { for (int col = 1; col <= row; col++) { if (col > 1) { cout << ' '; } cout << (((row + col) % 3 == 1) ? 2 : 1); } cout << '\n'; } return 0; }