using namespace std;
int main() {
int n;
cin >> n;
if (n>20) {
return 0;
};
char charlist[20][20] = {' '};
//行
for (int i = 0,m=n-1; i < 20; ++i,m--)
{
if (i<n) {
//计算第一行所需的#
int sum = 1 + (m - 1) * 2;
//第一行空格
int white = 20 - sum;
//列
for (int j = 0; j < 20; j++)
{
if (j<white/2||j>20-(white/2)) {
charlist[i][j] = ' ';
}
else
{
charlist[i][j] = '#';
}
}
}
}
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
cout << charlist[i][j];
}
cout << "\n";
}
}