#include <iostream>
#include <fstream>
#include <sstream>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <assert.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <set>

//#define DEBUG 1

#define int long long
#define for0(i,n) for (int i=0; i<n; i++)
#define iter(c) for(auto it=c.begin(); it!=c.end(); it++)
#define vec(x) vector< x >
#define pb push_back
#define ms(a,z) memset(a,z,sizeof(a));
#define mp make_pair
#define X first
#define Y second
#define sqr(x) 1LL*(x)*(x)
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define all(a) a.begin(),a.end()
#define sz(x) (int)(x).size()
#ifdef int
#define read(x) scanf("%lld",&x);
#else
#define read(x) scanf("%d",&x);
#endif

#ifdef DEBUG
#define nl cout<<"\n";
#define pr(x) cout<<(x)<<" ";
#define prl(x) cout<<#x " = "<<x<<endl;
#define prp(x) cout<<"("<<(x).first<<" "<<(x).second<<") ";
#define printv(v) {for(int _=0; _<sz(v); _++) cout<<v[_]<<" "; cout<<"\n";}
#define printa(a,s) {for (int _=0; _<s; _++) cout<<a[_]<<" "; cout<<"\n";}
#define print2D(a,m,n) {for (int _=0; _<m; _++) {for (int __=0; __<n; __++) cout<<a[_][__]<<" "; cout<<"\n";} cout<<"\n";}
#define debug cout<<"ok at line "<<__LINE__<<endl;
#else
#define nl
#define pr(x)
#define prl(x)
#define prp(x)
#define printv(v)
#define printa(a,s)
#define print2D(a,m,n)
#define debug
#endif

using namespace std;

typedef unsigned long long ll;

const int INF = 2147483647;
const long long INFL = 9223372036854775807LL;
const double EPSILON = 0.00000001;
const long long MOD = 1000000007;

int suffix[200005];

int find_suffix(string s)
{
    //find length of longest suffix of s that is also a prefix of s
    suffix[0] = suffix[1] = 0;
    for (int i=2; i<=s.length(); i++) {
        int j = suffix[i-1];
        while (true) {
            if (s[j] == s[i-1]) {
                suffix[i] = j+1;
                break;
            }
            else if (j == 0) {
                suffix[i] = 0;
                break;
            }
            j = suffix[j];
        }
    }
    //printa(suffix,s.length()+1);
    return suffix[s.length()];
}

vector<ll> count_chars(string s)
{
    vector<ll> ret(26,0);
    iter(s)
        ret[*it-'a']++;
    return ret;
}

vector<ll> query(vector<vector<ll>> & chr_cnt, vector<ll> & lens, string g1, ll r)
{
    vector<ll> ret(26,0);
    if (r <= 0)
        return ret;

    int lv = sz(lens)-1;
    while (lv > 0) {
        if (lens[lv-1] <= r) {
            r -= lens[lv-1];
            for0(i,26) {
                ret[i] += chr_cnt[lv-1][i];
            }
        }
        lv--;
    }
    //prl(r)
    assert(r <= g1.length());

    for (int i=0; r>0 && i<g1.length(); i++,r--) {
        ret[g1[i]-'a']++;
    }
    return ret;
}

void solve(string g1, string g2, ll l, ll r)
{
    vector<vector<ll>> chr_cnt;
    vector<ll> lens;
    chr_cnt.pb(count_chars(g1));
    chr_cnt.pb(count_chars(g2));
    lens.pb(g1.length());
    lens.pb(g2.length());

    while (lens.back() < r) {
        vector<ll> next_cnt(26,0);
        for0(i,26) {
            next_cnt[i] = chr_cnt[sz(chr_cnt)-1][i] + chr_cnt[sz(chr_cnt)-2][i];
        }
        chr_cnt.pb(next_cnt);
        lens.pb(lens[sz(lens)-1] + lens[sz(lens)-2]);
    }

    vector<ll> r_cnt = query(chr_cnt, lens, g1, r);
    vector<ll> l_cnt = query(chr_cnt, lens, g1, l-1);
    for0(i,26) {
        cout<<r_cnt[i]-l_cnt[i]<<" ";
    }
    cout<<endl;
}

int32_t main()
{
    #ifdef DEBUG
    freopen("D.txt","r",stdin);
    //freopen("","w",stdout);
    #endif

    string s;
    cin >> s;
    s = s.substr(0,s.length()/2);
    long long l,r;
    cin >> l >> r;

    int suf_len = find_suffix(s);
    string T = s.substr(0,s.length()-suf_len);
    string g1 = s+T;
    string g2 = s+T+s;
    solve(g1, g2, l, r);
    return 0;
}


Measured memory_bytes: 2240