#include
using namespace std;
int main() {
int N;
cin >> N;
// Validate input
if (N <= 0 || N > 10) {
cout << "Invalid input. Please enter a value between 1 and 10." << endl;
return 0;
}
// Generate Pascal's Triangle
for (int i = 0; i < N; i++) {
int value = 1;
// Print spaces for alignment
for (int j = 0; j < N - i - 1; j++) {
cout << " "; // Single space for proper alignment
}
// Print numbers in the row
for (int j = 0; j <= i; j++) {
cout << value; // Print the current value
value = value * (i - j) / (j + 1); // Update value for the next number
if (j < i) { // Add a space after each number except the last
cout << " ";
}
}
cout << endl; // Move to the next line
}
return 0;
}