Problem: 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

Solution (in CPP):

Solution:
#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
#include<string>
#include<cstdio>
#include<cctype>
#include<cassert>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<iostream>
#include<algorithm>

#define For(i,x,y) for (int i=x;i<y;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lf else if

#define dprintf(...) fprintf(stderr,__VA_ARGS__)
using namespace std;

typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
typedef vector<int> Vi;

int IN(){
	int c,f,x;
	while (!isdigit(c=getchar())&&c!='-');c=='-'?(f=1,x=0):(f=0,x=c-'0');
	while (isdigit(c=getchar())) x=(x<<1)+(x<<3)+c-'0';return !f?x:-x;
}

const int N=400000+19;

char s[N];
ll fib[100];
int Fail[N];
int n,flag,a,b,m;
ll l,r,ca,cb;
vector<ll> V1,V2;

void getfail(){
	Fail[1]=0;
	for (int i=2,j=0;i<=n;i++){
		while (j&&s[j+1]!=s[i]) j=Fail[j];
		if (s[j+1]==s[i]) j++;
		Fail[i]=j;
	}
}
vector<ll> Work(ll m){
	vector<ll> ans;
	ans.resize(26);
	ca=0;cb=0;
	if (flag){
		For(i,1,n+1) ans[s[i]-'a']+=m/n;
		For(i,1,m%n+1) ans[s[i]-'a']++;
	} else{
		while (m>n){
			int i=1;
			while (b*fib[i+1]+a*fib[i+2]<=m) i++;
			m-=b*fib[i]+a*fib[i+1];
			ca+=fib[i+1];
			cb+=fib[i];
		}
		For(i,1,m+1) ans[s[i]-'a']++;
		For(i,1,a+1) ans[s[i]-'a']+=ca;
		For(i,a+1,n+1) ans[s[i]-'a']+=cb;
	}
	return ans;
}

int main(){
	fib[0]=0;
	fib[1]=1;
	For(i,2,100) fib[i]=fib[i-1]+fib[i-2];
	scanf("%s",s+1);
	n=strlen(s+1);
	cin>>l>>r;
	getfail();
	for (m=Fail[n];m&&m>=(n+1)/2;m=Fail[m]);
	n-=m;
	m=Fail[n];
	if (m==0) flag=1;
	if (n%2==0){
		int chk=1;
		For(i,0,n/2) if (s[i+1]!=s[n/2+i+1]) chk=0;
		if (chk) flag=1;
	}
	b=m;
	a=n-m;
	V1=Work(r);
	V2=Work(l-1);
	For(i,0,26) printf("%lld ",V1[i]-V2[i]);
	puts("");
}