#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; cin >> n; rep(i, n) { rep(j, i + 1) { if (i % 3 == (j + 2 * i + 2) % 3) { cout << 2 << " "; } else { cout << 1 << " "; } } cout << endl; } return 0; }