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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <vector>
#include <cassert>
#define rep(i, a, b) for (int i = (a), _ = (b); i <= _; ++ i)
#define per(i, a, b) for (int i = (a), _ = (b); i >= _; -- i)
#define For(i, a, b) for (int i = (a), _ = (b); i < _; ++ i)
#define ri rd<int>
#define rl rd<LL>
using namespace std;
typedef long long LL;
const int maxN = 2e5 + 7;
const int maxC = 26;
const int maxM = 127;
const LL INF = 1e18;

template<class T> inline T rd() {
	bool f = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') f = 0;
	T x = 0; for (; isdigit(c); c = getchar()) x = x * 10 + c - 48; return f ? x : -x;
}

char s[maxN];
int n, len, t;
int nx[maxN];
LL occ[maxC];
LL L, R;

void kmp() {
	nx[1] = 0; int i, j;
	for (i = 2, j = 0; i <= n; ++ i) {
		while (j && s[j+1] != s[i]) j = nx[j];
		if (s[j+1] == s[i]) ++ j;
		nx[i] = j;
	}
}

void solve1(LL len, LL kd) {
	LL tms = len / t, res = len % t;
	rep (i, 1, t) occ[s[i] - 'a'] += kd * (tms + (i <= res));
}

namespace solve2 {
	LL f[maxM][maxC], len[maxM], Top;
	
	void init() {
		len[1] = t; rep (i, 1, t) ++ f[1][s[i] - 'a'];
		len[0] = n - t; rep (i, t+1, n) ++ f[0][s[i] - 'a'];
		For (i, 2, maxM) {
			len[i] = len[i-1] + len[i-2];
			Top = i;
			For (j, 0, maxC) f[i][j] = f[i-1][j] + f[i-2][j];
			if (len[i] > INF) break;
		}
	}

	void dfs(int p, LL l, LL kd) {
		if (l <= 0) return;
		assert(l <= len[p]);
		if (l == len[p]) {
			For (i, 0, 26) occ[i] += kd * f[p][i];
			return;
		}
		if (p == 0 || p == 1) {
			int bg = (p == 1) ? 0 : t;
			rep (i, 1, l) occ[s[bg+i] - 'a'] += kd;
			return;
		}
		dfs(p-1, min(l, len[p-1]), kd);
		dfs(p-2, l - len[p-1], kd);
	}

	void work(LL l, LL kd) {
		dfs(Top, l, kd);
	}
}

int main() {

	scanf("%s", s+1);
	L = rl(), R = rl();
	n = strlen(s+1) >> 1;
	len = (n + 1) >> 1;
	kmp();
	
	t = n - nx[n];
	if (n % t == 0) solve1(R, 1), solve1(L-1, -1);
	else solve2::init(), solve2::work(R, 1), solve2::work(L-1, -1);

	For (i, 0, 26) printf("%lld%c", occ[i], " \n"[i == 25]);

	return 0;
}