#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef complex<double> point;
#define xx real()
#define yy imag()

#define REP(i, a, b) for(int i = (a); i < (int)(b); i++)
#define REPN(i, a, b) for(int i = (a); i <= (int)(b); i++)
#define FA(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define SZ(x) (int)(x).size()
#define BE(x) (x).begin(), (x).end()
#define SORT(x) sort(BE(x))
#define _1 first
#define _2 second

#define x1 gray_cat_x1
#define y1 gray_cat_y1

template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

#define file "I1"

const double EPS = 1e-9;
const double PI = acos(-1.);
const int INF = 1e9;
const ll MOD = 1e9 + 7;

const int MAXLEN = 4e5 + 5;

struct my_string {
	char s[MAXLEN];
	int n;
	
	int z[MAXLEN];
	
	void get_z(){
		z[0] = 0;
		int l = 0, r = 0;
		for(int i = 1; i < n; i++){
			if (i <= r){
				z[i] = min(r - i + 1, z[i - l]);
			}
			while(i + z[i] < n && s[z[i]] == s[i + z[i]]){
				z[i]++;
			}
			if (i + z[i] - 1 > r){
				l = i;
				r = i + z[i] - 1;
			}
		}
	}
};

my_string str;

ll cnt[200];
ll ans[200];

ll cnta[200], cntb[200];

vector<pair<ll, ll> > vv;
ll len_a, len_b;

void calc(ll pos, ll sgn, int ind) {
	if (pos <= 0) {
		return;
	}
	if (ind <= 1) {
		REP(i, 0, pos) {
			ans[str.s[i]] += sgn;
		}
		return;
	}
	ll cur_len = len_a * vv[ind]._1 + len_b * vv[ind]._2;
	if (cur_len > pos) {
		calc(pos, sgn, ind - 1);
		return;
	}
	calc(pos - cur_len, sgn, ind - 1);
	REPN(i, 'a', 'z') {
		ans[i] += sgn * vv[ind]._1 * cnta[i];
		ans[i] += sgn * vv[ind]._2 * cntb[i];
	}
}


void solve(){
	ll l, r;
	scanf("%s%lld%lld", &str.s[0], &l, &r);
	str.n = strlen(str.s) / 2;
	l--;
	r--;
	str.get_z();
	int start = str.n;
	REP(i, 1, str.n) {
		if (str.z[i] == str.n - i) {
			start = i;
			break;
		}
	}
	if (str.n % start == 0) {
		REP(i, 0, str.n) {
			cnt[str.s[i]]++;
		}
		
		for(; l <= r; ) {
			if (l % str.n == 0) {
				if (l / str.n < r / str.n) {
					REPN(j, 'a', 'z') {
						ans[j] += (r / str.n - l / str.n) * cnt[j];
					}
					l = r - r % str.n;
				}
			}
			ans[str.s[l % str.n]]++;
			l++;
		}
	} else {
		if (start <= str.n / 2) {
			/*for(int i = start - 1; i >= 0; i--) {
				str.s[str.n++] = str.s[i];
			}*/
			REP(i, 0, start) {
				str.s[str.n++] = str.s[i];
			}
			str.get_z();
			start = str.n - start;
		}
		str.s[str.n] = 0;
		
		//printf("%s\n", str.s);
		
		len_a = str.n - start;
		len_b = str.n - 2 * len_a;
		//printf("%lld %lld\n", len_a, len_b);
		REP(i, 0, str.n) {
			if (i < len_a) {
				cnta[str.s[i]]++;
			} else if (i < len_a + len_b) {
				cntb[str.s[i]]++;
			}
		}
		
		/*REPN(j, 'a', 'z') {
			printf("%lld ", cnta[j]);
		}
		putchar('\n');
		REPN(j, 'a', 'z') {
			printf("%lld ", cntb[j]);
		}
		putchar('\n');*/
		
		vv.pb(mp(1, 0));	// A
		vv.pb(mp(1, 1));	// AB
		while(1) {
			int ind = SZ(vv) - 1;
			if (len_a * vv[ind]._1 + len_b * vv[ind]._2 > r) {
				break;
			}
			vv.pb(mp(vv[ind]._1 + vv[ind - 1]._1, vv[ind]._2 + vv[ind - 1]._2)); 
		}
		
		calc(r + 1, 1, SZ(vv) - 1);
		
		/*REPN(j, 'a', 'z') {
			printf("%lld ", ans[j]);
		}
		putchar('\n');*/
		
		calc(l, -1, SZ(vv) - 1);
	}
	REPN(j, 'a', 'z') {
		printf("%lld ", ans[j]);
	}
	putchar('\n');
}   

int main(){

    //freopen(file".in", "r", stdin); freopen(file".out", "w", stdout);
    int t = 1;
    //cin >> t;
    while(t--){
        solve();    
    }
}


Measured memory_bytes: 896