#include <iostream>
using namespace std;
int main() {
char s[11];
cin >> s;
int n = 0;
while (s[n] != '\0')
n++;
int i = n;
while (i) {
int j = 0;
while (j < i) {
cout << s[j];
j++;
}
cout << endl;
i--;
}
i = 0;
while (s[i] != '\0') {
int j = i;
while (ch[j] != '\0') {
cout << s[j];
j++;
}
cout << endl;
i++;
}
return 0;
}