#include <iostream>
#include <string>

int main() {
    std::string value = std::string();
    value.reserve(9);
    for (int count = 4; count >= 0; count--) {
        value.clear();
        for (int j = 0; j < count; j++) {
            value.push_back(' ');
        }
        int limit = 9 - count * 2;
        for (int j = 0; j < limit; j++) {
            value.push_back('*');
        }
        for (int j = 0; j < count; j++) {
            value.push_back(' ');
        }
        std::cout << value << '\n';
    }
}