/** * @FileName a.cpp * @Author kanpurin * @Created 2022.06.11 02:02:51 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; vector> mat(n,vector(n)); vector v(n); iota(v.begin(), v.end(), 1); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << v[j] << " "; } cout << endl; rotate(v.begin(), v.begin()+1,v.end()); } return 0; }