//Bai12
#include<bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define se second
#define fi first
#define be begin()
#define en end()
#define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
string s;
void Run()
{
cin >> s;
s = " " + s;
vector<string> vt;
int mid = s.size() / 2;
for(int i = 1; i <= mid; i++)
{
string tmp = "";
for(int j = mid - i + 1; j <= mid + i - 1; j++) tmp += s[j];
vt.push_back(tmp);
}
for(int i = 0; i < mid; i++) cout << vt[i] << el;
for(int i = mid - 2; i >= 0; i--) cout << vt[i] << el;
}
int main()
{
Faster;
Run();
return 0;
}
Ly9CYWkxMgoKI2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbCAiXG4iCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZwojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIGZpIGZpcnN0CiNkZWZpbmUgYmUgYmVnaW4oKQojZGVmaW5lIGVuIGVuZCgpCiNkZWZpbmUgRmFzdGVyIGNpbi50aWUoMCk7IGNvdXQudGllKDApOyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwpzdHJpbmcgczsKdm9pZCBSdW4oKQp7CiAgIGNpbiA+PiBzOwogICBzID0gIiAiICsgczsKICAgdmVjdG9yPHN0cmluZz4gdnQ7CiAgIGludCBtaWQgPSBzLnNpemUoKSAvIDI7CiAgIGZvcihpbnQgaSA9IDE7IGkgPD0gbWlkOyBpKyspCiAgIHsKICAgICAgIHN0cmluZyB0bXAgPSAiIjsKICAgICAgIGZvcihpbnQgaiA9IG1pZCAtIGkgKyAxOyBqIDw9IG1pZCArIGkgLSAxOyBqKyspIHRtcCArPSBzW2pdOwogICAgICAgdnQucHVzaF9iYWNrKHRtcCk7CiAgIH0KICAgZm9yKGludCBpID0gMDsgaSA8IG1pZDsgaSsrKSBjb3V0IDw8IHZ0W2ldIDw8IGVsOwogICBmb3IoaW50IGkgPSBtaWQgLSAyOyBpID49IDA7IGktLSkgY291dCA8PCB2dFtpXSA8PCBlbDsKCn0KaW50IG1haW4oKQp7CiAgICBGYXN0ZXI7CiAgICBSdW4oKTsKICAgIHJldHVybiAwOwp9Cgo=