#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
//---------------------------------------------------------------------------------------------------
typedef long long ll;
struct RollingHash {
	static const ll mo0 = 1000000007, mo1 = 1000000009;
	static ll mul0, mul1;
	static const ll add0 = 1000010007, add1 = 1003333331;
	static vector<ll> pmo[2];
	vector<int> s; int l; vector<ll> hash_[2];
	void init(vector<int> s) {
		this->s = s; l = s.size(); int i, j;
		hash_[0] = hash_[1] = vector<ll>(1, 0);
		if (!mul0) mul0 = 10009 + (((ll)&mul0) >> 5) % 259, mul1 = 10007 + (((ll)&mul1) >> 5) % 257;
		if (pmo[0].empty()) pmo[0].push_back(1), pmo[1].push_back(1);
		for (int i = 0; i < l; i++) hash_[0].push_back((hash_[0].back()*mul0 + add0 + s[i]) % mo0);
		for (int i = 0; i < l; i++) hash_[1].push_back((hash_[1].back()*mul1 + add1 + s[i]) % mo1);
	}
	pair<ll, ll> hash(int l, int r) { // s[l..r]
		if (l>r) return make_pair(0, 0);
		while (pmo[0].size()<r + 2)
			pmo[0].push_back(pmo[0].back()*mul0%mo0), pmo[1].push_back(pmo[1].back()*mul1%mo1);
		return make_pair((hash_[0][r + 1] + (mo0 - hash_[0][l] * pmo[0][r + 1 - l] % mo0)) % mo0,
			(hash_[1][r + 1] + (mo1 - hash_[1][l] * pmo[1][r + 1 - l] % mo1)) % mo1);
	}
};
vector<ll> RollingHash::pmo[2]; ll RollingHash::mul0, RollingHash::mul1;
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/



#define INF 1LL<<60
string S, SS, SSS;
ll L, R;
//---------------------------------------------------------------------------------------------------
string f(string x) {
    RollingHash rh;
    vector<int> v;
    for (char c : x) v.push_back(c - 'a');
    rh.init(v);

    int N = v.size();
    rep(len, (N + 2) / 2, N + 1) {
        int a = 0;
        int c = len;
        int d = min(len * 2 - 1, N - 1);
        int b = a + (d - c + 1) - 1;

        if (rh.hash(a, b) == rh.hash(c, d)) {
            return x + x.substr(b + 1, c - b - 1);
        }
    }
    return "?";
}
//---------------------------------------------------------------------------------------------------
ll cnt[201];
vector<ll> memo[201];
void pre() {
    SS = f(S);
    SSS = f(SS);

    cnt[1] = SS.length() / 2;
    cnt[2] = SSS.length() / 2;

    rep(i, 3, 201) {
        cnt[i] = cnt[i - 1] + cnt[i - 2];
        if (INF < cnt[i]) cnt[i] = INF;
    }

    memo[1].resize(26, 0);
    rep(i, 0, cnt[1]) memo[1][SS[i] - 'a']++;

    memo[2].resize(26, 0);
    rep(i, 0, cnt[2]) memo[2][SSS[i] - 'a']++;

    rep(i, 3, 201) {
        memo[i].resize(26, 0);
        rep(j, 0, 26) memo[i][j] = memo[i - 1][j] + memo[i - 2][j];
    }
}
//---------------------------------------------------------------------------------------------------
vector<ll> merge(vector<ll> &a, vector<ll> &b) {
    vector<ll> v(26, 0);
    rep(i, 0, 26) v[i] = a[i] + b[i];
    return v;
}
vector<ll> rec(ll x, int d) {
    if (x == cnt[d]) return memo[d];

    if (d == 1) {
        vector<ll> v(26, 0);
        rep(i, 0, x) v[SS[i] - 'a']++;
        return v;
    }

    if (d == 2) {
        vector<ll> v(26, 0);
        rep(i, 0, x) v[SSS[i] - 'a']++;
        return v;
    }

    if (x <= cnt[d - 1]) return rec(x, d - 1);

    auto a = rec(cnt[d - 1], d - 1);
    auto b = rec(x - cnt[d - 1], d - 2);
    a = merge(a, b);

    return a;
}
vector<ll> _rec(ll x, int d) {
    auto a = rec(cnt[d], d);
    auto b = rec(x - cnt[d], d);
    a = merge(a, b);
    return a;
}
vector<ll> solve(ll x) {
    if (x <= cnt[1] * 2) {
        vector<ll> v(26, 0);
        rep(i, 0, x) v[SS[i] - 'a']++;
        return v;
    }

    int init_i;
    rep(i, 1, 200) {
        if (cnt[i] * 2 < x && x <= cnt[i + 1] * 2) {
            init_i = i + 1;
            break;
        }
    }

    return _rec(x, init_i);
}
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> S >> L >> R;

    pre();

    auto a = solve(L - 1);
    auto b = solve(R);

    rep(i, 0, 26) b[i] -= a[i];
    rep(i, 0, 26) {
        if (0 < i) printf(" ");
        printf("%lld", b[i]);
    }
    printf("\n");
}

Measured memory_bytes: 25816