#include <cstdio>
#include <cstring>
typedef long long ll;

int n,nk,f[100005],g[100005][26];
char s[200005];

ll Calc(ll m,int c)
{
    if(m<=n)return g[m][c];
    ll l1=n,l2=nk,k,s1=g[l1][c],s2=g[l2][c];
    while(l1+l2<=m)k=l1,l1+=l2,l2=k,k=s1,s1+=s2,s2=k;
    return s1+Calc(m-l1,c);
}

int main()
{
    scanf("%s",s+1),n=strlen(s+1)>>1,f[0]=-1;
    for(int i=1,j=-1;i<=n;f[i++]=++j)while(j>=0&&s[j+1]!=s[i])j=f[j];
    nk=n-f[n];
    for(int i=1;i<=n;++i)memcpy(g[i],g[i-1],sizeof g[i]),++g[i][s[i]-'a'];
    ll l,r;
    scanf("%lld%lld",&l,&r);
    for(int i=0;i<26;++i)printf("%lld%c",Calc(r,i)-Calc(l-1,i),i==25?'\n':' ');
    return 0;
}