#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <string>

using namespace std;

int main()
{
    freopen("army.in", "r", stdin);
    freopen("army.out", "w", stdout);
    string s;
    getline(cin, s);
    
    vector<int> y(s.length());
    for (int i = 0; i < (y.size() + 1) / 2; i++)
        y[i] = 2 * i + 1;

    for (int i = (y.size() + 1) / 2; i < y.size(); i++)
        for (int k = 0; k < y.size() - i; k++)
            if (s.substr(0, 2 * k + 1) == s.substr(i - k, 2 * k + 1)) y[i] = 2 * k + 1;

    for (int i = 0; i < y.size(); i++)
        cout << y[i] << (i + 1 == y.size() ? "\n" : " ");
}