#include #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) (x).begin(),(x).end() using std::cin; using std::cout; using std::set; using std::vector; int main() { int n; cin >> n; vector p(n); iota(all(p), 1); rep(i, n) { rep(j, n) cout << p[j] << ' '; puts(""); } return 0; }