#include <iostream>
using namespace std;
int main() {
for (int i = 1; i <= 5; i++) {
for (int j = i; j <= 5; j++) {
// Print a star if we are at the first row, the start of the row, or the end of the row.
if (i == 1 || j == i || j == 5) cout << "* ";
else cout << " "; // Print spaces elsewhere
}
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSA1OyBpKyspIHsKICAgICAgICBmb3IgKGludCBqID0gaTsgaiA8PSA1OyBqKyspIHsKICAgICAgICAgICAgLy8gUHJpbnQgYSBzdGFyIGlmIHdlIGFyZSBhdCB0aGUgZmlyc3Qgcm93LCB0aGUgc3RhcnQgb2YgdGhlIHJvdywgb3IgdGhlIGVuZCBvZiB0aGUgcm93LgogICAgICAgICAgICBpZiAoaSA9PSAxIHx8IGogPT0gaSB8fCBqID09IDUpIGNvdXQgPDwgIiogIjsKICAgICAgICAgICAgZWxzZSBjb3V0IDw8ICIgICI7IC8vIFByaW50IHNwYWNlcyBlbHNld2hlcmUKICAgICAgICB9CiAgICAgICAgY291dCA8PCBlbmRsOwogICAgfQogICAgcmV0dXJuIDA7Cn0K