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 <bits/stdc++.h>
#define ll long long

using namespace std;

const int maxn = 2*1e5+10;

string s;
ll l,r,len[maxn],cnt[100][maxn],ans[30];
int KMP[maxn];

int pre_calc(string s, int type) {
    memset(KMP,0,sizeof(KMP));
    //cout<<s<<endl;
    int n= s.length();
    for (int i=0;i<n;i++) {
        if (i==0) KMP[i]=-1;
        else {
            KMP[i] = KMP[i-1];
            while (1) {
                //cout<<i<<" "<<KMP[i]<<endl;
                if (s[KMP[i]+1] == s[i]) {
                    KMP[i]++;
                    break;
                }
                if (KMP[i]==-1) break;
                KMP[i] = KMP[KMP[i]];
            }
        }
    }
    //cout<<"fuk"<<endl;
    int tmp = KMP[n-1];
    //cout<<tmp<<endl;
    if (type==1) while (tmp*2+2>=n) tmp=KMP[tmp];
    else while (tmp*2+2>n) tmp=KMP[tmp];
    return tmp+1;
}

void calc(ll LEN,ll coe) {
    int T1 = pre_calc(s,1);
    string s2 = "";
    for (int i=0;i<s.length()-T1;i++) s2+=s[i];
    int T2 = pre_calc(s2,2);
    int sz=0;
    //cout<<T1<<" "<<T2<<endl;
    for (int i=T2;i<s2.length()-T2;i++) {
        len[sz]++;
        cnt[sz][s2[i]-'a']++;
    }
    sz++;
    for (int i=0;i<T2;i++) {
        len[sz]++;
        cnt[sz][s2[i]-'a']++;
    }
    sz++;
    while (len[sz-1]<=LEN) {
        len[sz] = len[sz-1] + len[sz-2];
        for (int i=0;i<26;i++) cnt[sz][i] = cnt[sz-1][i] + cnt[sz-2][i];
        sz++;
        ///cout<<len[sz-1]<<endl;
    }
    for (int i=sz-1;i>=2;i--) {
        if (LEN>=len[i]) {
            LEN-=len[i];
            for (int j=0;j<26;j++) ans[j]+= coe*cnt[i][j];
        }
    }
    for (int i=0;i<LEN;i++) ans[s[i]-'a']+=coe;

}

int main() {
   // freopen("in.txt","r",stdin);
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin>>s;
    cin>>l>>r;
    calc(r,1);
    calc(l-1,-1);
    for (int i=0;i<26;i++) cout<<ans[i]<<" ";
}