#include using namespace std; int pat[3][3] = { {2, 1, 1}, {1, 1, 2}, {1, 2, 1} }; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N; cin >> N; vector cur = {2}; for(int i = 0; i < N; i++) { for(int j = 0; j < i + 1; j++) { cout << pat[i % 3][j % 3] << " "; } cout << "\n"; } return 0; }