#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "YES"; }
  string_type do_falsename() const { return "NO"; }
};

class RollingHash {
  using ll = long long;
  const int n;
  static const ll moda = 1000000000000037LL;
  static const ll modb = 1000000000000091LL;
  static const ll pa = 17LL;
  static const ll pb = 19LL;
  vector<ll> a, b, p, q;
public:
  RollingHash (const string &str) :
    n(str.size()), a(n+1, 0), b(n+1, 0), p(n+1, 1), q(n+1, 1) {
    for (int i = 0; i < n; ++i) {
      a[i+1] = (a[i] * pa + str[i]) % moda;
      b[i+1] = (b[i] * pb + str[i]) % modb;
      p[i+1] = p[i] * pa % moda;
      q[i+1] = q[i] * pb % modb;
    }
  }
  pair<ll,ll> query(int l, int r) {
    return make_pair(((__int128)p[r - l] * a[l] - a[r] + moda) % moda,
                     ((__int128)q[r - l] * b[l] - b[r] + modb) % modb);
  }
};

ll cnt[201000][32];

vector<ll> add_vector(vector<ll> a, vector<ll> b) {
  REP(i,26) a[i] += b[i];
  return a;
}

pair<vector<ll>,ll> f(ll n,
                      const ll left_len,  const vector<ll> left,
                      const ll right_len, const vector<ll> right)
{
  vector<ll> res(26);
  if (left_len + right_len <= n) {
    ll sum_len = left_len + right_len;
    vector<ll> sum = add_vector(left, right);
    auto x = f(n, sum_len, sum, left_len, left);
    res = add_vector(res, x.first);
    n = x.second;
  }
  if (left_len <= n) {
    res = add_vector(res, left);
    n -= left_len;
  }
  return make_pair(res, n);
}

void solve(string S, ll l, ll r) {
  S = S.substr(0, S.size() / 2);
  --l;
  const int n = S.size();
  RollingHash hash(S);
  int max_len = 0;
  REP(i,n) {
    if (hash.query(0, i) == hash.query(n - i, n))
      max_len = i;
  }
  REP(i,n) {
    REP(j,26) cnt[i+1][j] = cnt[i][j];
    cnt[i+1][S[i] - 'a'] += 1;
  }
  if (max_len == 0) {
    REP(ch,26) {
      ll res = 0;
      res += cnt[n][ch] * (r / n) + cnt[r % n][ch];
      res -= cnt[n][ch] * (l / n) + cnt[l % n][ch];
      cout << res << " \n"[ch == 25];
    }
  }
  else {
    vector<ll> left(26), right(26);
    REP(i,26) left[i] = cnt[n - max_len][i];
    REP(i,26) right[i] = cnt[n][i] - cnt[n - max_len][i];
    auto rret = f(r, n - max_len, left, max_len, right);
    auto lret = f(l, n - max_len, left, max_len, right);
    REP(i,26) {
      ll res =
        (rret.first[i] + cnt[rret.second][i]) -
        (lret.first[i] + cnt[lret.second][i]);
      cout << res << " \n"[i == 25];
    }
  }
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll r;
	string S;
	ll l;
	cin >> S;
	scanf("%lld", &l);
	scanf("%lld", &r);
	solve(S, l, r);
	return 0;
}


Measured memory_bytes: 30336