#include <iostream> using std::cin; using std::cout; using std::endl; int main() { int n; cin >> n; for (int a=1; a<=n; a++){ int k; if (a==1){ k = n; } for (int b=1; b <= k; b++){ cout << a; if (b < k){ cout << " "; } else{ cout << endl; } } k--; } return 0; }