#include <iostream>
#include <cstring>
using namespace std;
const int MAX_LENGTH = 1000;
const int MAX_SIZE = 20;
void cutStars(char l[]) {
int n = strlen(l);
while (l[n - 1] == '*') {
--n;
}
l[n] = 0;
}
int main() {
char mt[MAX_SIZE + 1][MAX_LENGTH + 1];
int maxSize = 0, currentLine = 0;
while (!cin.eof()) {
cin.getline(mt[currentLine], MAX_LENGTH + 1);
int n = strlen(mt[currentLine]);
if (n > maxSize) {
maxSize = n;
}
cutStars(mt[currentLine]);
++currentLine;
}
for (int j = 0; j < currentLine; ++j) {
int n = strlen(mt[j]);
for (int l = n; l < maxSize; ++l) {
cout << "*";
}
cout << mt[j] << "\n";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNvbnN0IGludCBNQVhfTEVOR1RIID0gMTAwMDsKY29uc3QgaW50IE1BWF9TSVpFID0gMjA7Cgp2b2lkIGN1dFN0YXJzKGNoYXIgbFtdKSB7CglpbnQgbiA9IHN0cmxlbihsKTsKCXdoaWxlIChsW24gLSAxXSA9PSAnKicpIHsKCQktLW47Cgl9CglsW25dID0gMDsKfQoKaW50IG1haW4oKSB7CgljaGFyIG10W01BWF9TSVpFICsgMV1bTUFYX0xFTkdUSCArIDFdOwoJaW50IG1heFNpemUgPSAwLCBjdXJyZW50TGluZSA9IDA7Cgl3aGlsZSAoIWNpbi5lb2YoKSkgewoJCWNpbi5nZXRsaW5lKG10W2N1cnJlbnRMaW5lXSwgTUFYX0xFTkdUSCArIDEpOwoJCWludCBuID0gc3RybGVuKG10W2N1cnJlbnRMaW5lXSk7CgkJaWYgKG4gPiBtYXhTaXplKSB7CgkJCW1heFNpemUgPSBuOwoJCX0KCQljdXRTdGFycyhtdFtjdXJyZW50TGluZV0pOwoJCSsrY3VycmVudExpbmU7Cgl9Cglmb3IgKGludCBqID0gMDsgaiA8IGN1cnJlbnRMaW5lOyArK2opIHsKCQlpbnQgbiA9IHN0cmxlbihtdFtqXSk7CgkJZm9yIChpbnQgbCA9IG47IGwgPCBtYXhTaXplOyArK2wpIHsKCQkJY291dCA8PCAiKiI7CgkJfQoJCWNvdXQgPDwgbXRbal0gPDwgIlxuIjsKCX0KCXJldHVybiAwOwp9