We will call a string that can be obtained by concatenating two equal strings an even string. For example, `xyzxyz` and `aaaaaa` are even, while `ababab` and `xyzxy` are not.

For a non-empty string S, we will define f(S) as the shortest even string that can be obtained by appending one or more characters to the end of S. For example, f(`abaaba`)=`abaababaab`. It can be shown that f(S) is uniquely determined for a non-empty string S.

You are given an even string S consisting of lowercase English letters. For each letter in the lowercase English alphabet, find the number of its occurrences from the l-th character through the r-th character of f^{10^{100}} (S).

Here, f^{10^{100}} (S) is the string f(f(f( ... f(S) ... ))) obtained by applying f to S 10^{100} times.

Constraints

* 2 \leq |S| \leq 2\times 10^5
* 1 \leq l \leq r \leq 10^{18}
* S is an even string consisting of lowercase English letters.
* l and r are integers.

Input

Input is given from Standard Input in the following format:


S
l r


Output

Print 26 integers in a line with spaces in between. The i-th integer should be the number of the occurrences of the i-th letter in the lowercase English alphabet from the l-th character through the r-th character of f^{10^{100}} (S).

Examples

Input

abaaba
6 10


Output

3 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


Input

xx
1 1000000000000000000


Output

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000000000000000000 0 0


Input

vgxgpuamkvgxgvgxgpuamkvgxg
1 1000000000000000000


Output

87167725689669676 0 0 0 0 0 282080685775825810 0 0 0 87167725689669676 0 87167725689669676 0 0 87167725689669676 0 0 0 0 87167725689669676 141040342887912905 0 141040342887912905 0 0
#include <iostream>
#include <cstdio>
#include <cstring>
#define N 200005
using namespace std;
typedef long long ll;
int n,m,nxt[N];
ll l,r,ans[26],w[26],f[105][26],len[105];
char s[N];
void print(){
	for(int i=0;i<25;i++) printf("%lld ",ans[i]);
	printf("%lld",ans[25]);
}
void solve(int k,ll pos,int op){
	if(pos>len[k]||pos<1) return;
	if(k<=1){
		int x=k==0?m:n;
		if(!op) for(int i=1;i<=pos;i++) ans[s[i]-'a']++;
		else for(int i=pos;i<=x;i++) ans[s[i]-'a']++;
		return;
	}
	if(!op){
		if(len[k-1]<=pos) {for(int i=0;i<26;i++) ans[i]+=f[k-1][i];solve(k-2,pos-len[k-1],0);}
		else solve(k-1,pos,0);
	}else{
		if(len[k-1]>=pos-1){for(int i=0;i<26;i++) ans[i]+=f[k-2][i];solve(k-1,pos,1);}
		else solve(k-2,pos-len[k-1],1);
	}
}
void get(int k,ll l,ll r){
	if(l>len[k-1]){get(k-2,l-len[k-1],r-len[k-1]);return;}
	if(r<=len[k-1]){get(k-1,l,r);return;}
	solve(k-1,l,1);
	solve(k-2,r-len[k-1],0);
}
int main(){
	scanf("%s",s+1);
	n=strlen(s+1)>>1;
	for(int i=2;i<=n;i++){
		nxt[i]=nxt[i-1];
		while(s[nxt[i]+1]!=s[i]&&nxt[i]) nxt[i]=nxt[nxt[i]];
		if(s[nxt[i]+1]==s[i]) nxt[i]++;
	}
	m=n-nxt[n];
	for(int i=1;i<=m;i++) w[s[i]-'a']++;
	scanf("%lld%lld",&l,&r);
	if(n%m==0||r<=n){
		if(l<=n){
			for(int i=l;i<=n&&i<=r;i++) ans[s[i]-'a']++;
			if(r<=n) {print();return 0;}
			l=n+1;
		}
		l-=n;r-=n;
		ll L=(l%m==0)?m:l%m,R=(r%m==0)?m:r%m;
		if((l-1)/m==(r-1)/m){
			for(int i=L;i<=R;i++) ans[s[i]-'a']++;
			print();
			return 0;
		}
		for(int i=L;i<=m;i++,l++) ans[s[i]-'a']++;
		for(int i=1;i<=R;i++,r--) ans[s[i]-'a']++;
		for(int i=0;i<26;i++) ans[i]+=(r-l+1)/m*w[i];
		print();
		return 0;
	}
	for(int i=1;i<=m;i++) f[0][s[i]-'a']++;
	for(int i=1;i<=n;i++) f[1][s[i]-'a']++;
	len[0]=m;len[1]=n;
	for(int i=2;i<=100;i++){
		for(int p=0;p<26;p++) f[i][p]=f[i-1][p]+f[i-2][p];
		len[i]=len[i-1]+len[i-2];
	}
	int x;
	for(int i=0;i<=100;i++){
		if(len[i]<r&&len[i+1]>=r){
			x=i;break;
		}
	}
	get(x+1,l,r);
	print();
	return 0;
}