#include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <unordered_set>
#include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <set>
#include <stack>
#include <fstream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bitset>
#include <sstream>
#include <ext/rope>
#include <ctime>
#include <random>
#include <cstdlib>
#include <complex>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
/* clang-format off */
/* TYPES */
#define ll long long
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int>
#define vll vector<long long>
#define vpii vector<pair<int, int>>
#define vpii vector<pair<int, int>>
#define vvpii vector<vector<pair<int, int>>>
#define vpll vector<pair<long long, long long>>
#define vvpll vector<vector<pair<long long, long long>>>
#define vvi vector<vector<int>>
#define vvll vector<vector<long long>>
#define mii map<int, int>
#define si set<int>
#define sc set<char>
/* FUNCTIONS */
#define feach(el, v) for(auto &el: v)
#define rep(i, n) for(int i=0;i<n;i++)
#define reprv(i, n) for(int i=n-1;i>=0;i--)
#define reps(i, s, e) for(int i=s;i<e;i++)
#define reprve(i, e, s) for(int i=e;i>=s;i--)
#define repe(x, y) for (auto &x: y)
#define repe2(x, a, y) for (auto &[x,a]: y)
typedef tree<int, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> oSet;
const int MAXLEN = 100020;
struct state {
int len, link;
map<char, int> next;
};
state st[MAXLEN * 2];
int sz, last;
void init() {
sz = 1, last = 0;
st[0].len = 0, st[0].link = -1;
}
void extend(char c) {
int cur = sz++;
st[cur].len = st[last].len + 1;
int p = last;
while (p != -1 && !st[p].next.count(c)) st[p].next[c] = cur, p = st[p].link;
last = cur;
if (p == -1) return void(st[cur].link = 0);
int q = st[p].next[c];
if (st[p].len + 1 == st[q].len) return void(st[cur].link = q);
int clone = sz++;
st[clone].len = st[p].len + 1, st[clone].next = st[q].next, st[clone].link = st[q].link;
while (p != -1 && st[p].next[c] == q) st[p].next[c] = clone, p = st[p].link;
st[q].link = st[cur].link = clone;
}
void build(string &s) { init(); repe(ch, s) extend(ch); }
int main() {
string s; cin >> s; build(s);
int n = s.size();
vll ans(n + 2, 0);
reps(i, 1, sz) ++ans[st[st[i].link].len + 1], --ans[st[i].len + 1];
ll curr = 0;
reps(i, 1, n + 1) curr += ans[i], cout << curr << " ";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dXRpbGl0eT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPG51bWVyaWM+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDx1bm9yZGVyZWRfc2V0PgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDx1dGlsaXR5PgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8bnVtZXJpYz4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHVub3JkZXJlZF9zZXQ+CiNpbmNsdWRlIDx1bm9yZGVyZWRfbWFwPgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxzdGFjaz4KI2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDxleHQvcGJfZHMvYXNzb2NfY29udGFpbmVyLmhwcD4KI2luY2x1ZGUgPGV4dC9wYl9kcy90cmVlX3BvbGljeS5ocHA+CiNpbmNsdWRlIDxiaXRzZXQ+CiNpbmNsdWRlIDxzc3RyZWFtPgojaW5jbHVkZSA8ZXh0L3JvcGU+CiNpbmNsdWRlIDxjdGltZT4KI2luY2x1ZGUgPHJhbmRvbT4KI2luY2x1ZGUgPGNzdGRsaWI+CiNpbmNsdWRlIDxjb21wbGV4PgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdXNpbmcgbmFtZ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