#include <iostream>
#include <string>
using namespace std;
int main() {
const int ROWS = 10;
const int COLS = 19;
const int MID = COLS / 2;
for (int i = 0; i < ROWS; ++i) {
string row(COLS, ' ');
int offset = abs(i - ROWS/2);
if (offset <= 4) {
int width;
if (i < ROWS / 2) {
width = 2 * offset + 1;
} else {
if (offset <= 2) {
width = 9 - 2 * offset;
} else {
width = 3;
}
}
int left = MID - width / 2;
int right = MID + width / 2;
for (int j = left; j <= right; ++j) {
if (j >=0 && j < COLS) {
row[j] = '*';
}
}
if (offset == 1) {
row[MID - 3] = ' ';
row[MID + 3] = ' ';
} else if (offset == 2) {
row[MID - 4] = ' ';
row[MID + 4] = ' ';
}
}
cout << row << endl;
}
return 0;
}