#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
#include <climits>
#include <string.h>
#include <stdio.h>
#define LL long long
#define all(x) (x).begin(),(x).end()
#define pii pair<int,int>
#define piii pair<int, pii >
#define REP(i,n) for (int (i)=0;(i)<(n);(i)++)
#define vi vector<int>
#define vpi vector< pii >
#define INF 2147483647
#define big 20160116
#define pb push_back
#define mp make_pair
using namespace std;
const int Maxk=1005;
string mul(string a,string b){
	int res[Maxk];
	memset(res,0,sizeof(res));
	reverse(a.begin(),a.end());
	reverse(b.begin(),b.end());
	for (int i=0;i<a.length();i++){
		for (int j=0;j<b.length();j++){
			res[i+j]+=(a[i]-'0')*(b[j]-'0');
		}
	}
	for (int i=0;i<Maxk;i++){
		if (res[i]>=10) {
			res[i+1]+=(res[i]/10);
			res[i]%=10;
		}
	}
	string ret;
	bool flag=false;
	for (int i=Maxk-1;i>=0;i--){
		if (flag || res[i]){
			flag=true;
			ret=ret+(char)(res[i]+'0');
		}
	}
	if (ret=="") ret="0";
	return ret;
}
string add(string a,string b){
	if (a.length()<b.length()) swap(a,b);
	while (a.length()!=b.length()){
		b='0'+b;
	}
	for (int i=a.length()-1;i>=0;i--){
		a[i]+=(b[i]-'0');
		if (a[i]>'9' && i){
			a[i]-=10;
			a[i-1]++;
		}
	}
	if (a[0]>'9'){
		a[0]-=10;
		a='1'+a;
	}
	return a;
}
// cf IO: I64d
// atcoder IO: lld
const int Maxn=500005;
const long long mod=12384738759127LL;
const long long tim=1311;
char s[Maxn];
int n;
long long cnt[Maxn][26],ans[26];
long long l,r;
void Output(long long x[]){
	for (int i=0;i<26;i++){
		printf("%lld ",x[i]);
	}
	printf("\n");
	exit(0);
}
pair<long long,vector<long long> > go(long long len,vector<long long> lfsum, long long lflen,vector<long long> rgsum,long long rglen){
	vector<LL> ret,newlf,newrg;
	ret.resize(26,0);
	newlf.resize(26,0);
//	newrg.resize(26,0);
	if (lflen+rglen<=len){
		for (int i=0;i<26;i++){
			newlf[i]=lfsum[i]+rgsum[i];
		}
		pair<LL,vector<LL> > tmp=go(len,newlf,lflen+rglen,lfsum,lflen);
		for (int i=0;i<26;i++) ret[i]+=(tmp.second)[i];
		len=tmp.first;
	}
	if (len>=lflen){
		for (int i=0;i<26;i++) ret[i]+=lfsum[i];
		len-=lflen;
	}
	return mp(len,ret); 
}
vector<long long> solve(long long target,int pre){
	vector<LL> lf,rg;
	lf.resize(26),rg.resize(26,0);
	for (int i=0;i<26;i++){
		lf[i]=cnt[n-pre][i];
		rg[i]=cnt[n][i]-cnt[n-pre][i];
	}
	pair<LL,vector<LL> > res=go(target,lf,(LL)n-pre,rg,(LL)pre);
	//cout<<res.first<<endl;
	for (int i=0;i<26;i++){
		(res.second)[i]+=cnt[res.first][i];
	} 
	return res.second;
}
int main(){
	scanf("%s",s);
	n=strlen(s);
	n/=2;
	scanf("%lld %lld",&l,&r);
	long long hashval1=0,hashval2=0;
	long long now=1;
	int len=0;
	for (int i=0;i<n-1;i++){
		hashval1=hashval1*tim;
		hashval1+=(long long)s[i];
		hashval2+=now*(long long)s[n-i-1];
		hashval1%=mod;
		hashval2%=mod;
		now*=tim;
		now%=mod;
		if (hashval1==hashval2){
			len=i+1;
		}
	}
	//cout<<len<<endl;
	for (int i=1;i<=n;i++){
		for (int j=0;j<26;j++){
			cnt[i][j]=cnt[i-1][j];
		}
		cnt[i][s[i-1]-'a']++;
	}
	l--;
	if (len==0){
		long long tot=0;
		for (int i=0;i<26;i++){
			ans[i]+=cnt[n][i]*(r/n);
			ans[i]-=cnt[n][i]*(l/n);
			ans[i]+=cnt[r%n][i];
			ans[i]-=cnt[l%n][i];
			tot+=ans[i];
		}
		//cout<<tot<<endl;
		Output(ans);
		return 0;
	}
	vector<LL> ans1=solve(r,len);
	vector<LL> ans2=solve(l,len);
	for (int i=0;i<26;i++){
		ans1[i]-=ans2[i];
		printf("%lld ",ans1[i]);
	}
	printf("\n");
	return 0;
}
/*
asdcasdcbbcbdabscbasbdcbbdcbdbcdababsdbcasbdcbasbdcbasdbcbaasdcbabdbcbdbcabdcbdsbcbadsbcbbdcsbbadbcsbasbdcasdcasdcbbcbdabscbasbdcbbdcbdbcdababsdbcasbdcbasbdcbasdbcbaasdcbabdbcbdbcabdcbdsbcbadsbcbbdcsbbadbcsbasbdc
1 1000000000000000000
*/

Measured memory_bytes: 20992