output_description: 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).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      l r
attempt: #!/usr/bin/env python3
  
  
  M = 10**9 + 7
  a = ord("a")
  
  
  def check_cycle(t, p):
  
      len_t = len(t)
      if len_t % p != 0:
          return False
      pre = t[:p]
      for i in range(p, len_t, p):
          if t[i : i + p] != pre:
              return False
  
      return True
  
  
  def solve_cycle(t, l, r):
  
      len_t = len(t)
      ql = (l - 1) // len_t
      rl = (l - 1) % len_t
      qr = r // len_t
      rr = r % len_t
  
      ans = [0] * 26
      for ch in t:
          ans[ord(ch) - a] += 1
      for j in range(26):
          ans[j] *= qr - ql
      for ch in t[: rr + 1]:
          ans[ord(ch) - a] += 1
      for ch in t[: rl + 1]:
          ans[ord(ch) - a] -= 1
  
      return ans
  
  
  def calc_part(tp, tm, len_p, len_m, dp0, dp1, r, ir):
  
      num_p = 0
      num_m = 0
      for i in range(ir, -1, -1):
          n = dp0[i] * len_p + dp1[i] * len_m
          if n <= r:
              num_p += dp0[i]
              num_m += dp1[i]
              r -= n
  
      vec = [0] * 26
      tr = tp
      if len_p + len_m < r:
          num_p += 1
          num_m += 1
          r -= len_p + len_m
      elif len_p < r:
          num_p += 1
          r -= len_p
          tr = tm
      for ch in tp:
          vec[ord(ch) - a] += num_p
      for ch in tm:
          vec[ord(ch) - a] += num_m
      for ch in tr[:r]:
          vec[ord(ch) - a] += 1
  
      return vec
  
  
  def solve_part(t, len_p, l, r):
  
      len_t = len(t)
      len_m = len_t - 2 * len_p
      dp0 = [0] * 121
      dp1 = [0] * 121
      dp0[0] = 2
      dp1[0] = 1
  
      for i in range(1, 121):
          dp0[i] = dp0[i - 1] + dp1[i - 1]
          dp1[i] = dp0[i - 1]
          n = dp0[i] * len_p + dp1[i] * len_m
          if l - 1 <= n:
              il = i - 1
          if r <= n:
              ir = i - 1
              break
  
      vec_l = calc_part(
          t[:len_p], t[len_p : len_p + len_m], len_p, len_m, dp0, dp1, l - 1, il
      )
      vec_r = calc_part(
          t[:len_p], t[len_p : len_p + len_m], len_p, len_m, dp0, dp1, r, ir
      )
  
      ans = [vec_r[j] - vec_l[j] for j in range(26)]
  
      return ans
  
  
  def solve(s, l, r):
  
      t = s[: len(s) // 2]
      len_t = len(t)
      if len_t == 1:
          return solve_cycle(t, l, r)
  
      len_p = 0
      ph = 0
      sh = 0
      base = 1
      for i in range(len_t // 2):
          ph *= 26
          ph += ord(s[i]) - a
          ph %= M
          sh += base * (ord(s[-1 - i]) - a)
          sh %= M
          if ph == sh:
              if check_cycle(t, i + 1):
                  return sovle_cycle(t[: i + 1], l, r)
              elif t[: i + 1] == t[-1 - i :]:
                  len_p = i + 1
          base *= 26
  
      if len_p == 0:
          return solve_cycle(t, l, r)
  
      return solve_part(t, len_p, l, r)
  
  
  def main():
      s = input()
      l, r = input().split()
      l = int(l)
      r = int(r)
  
      print(" ".join(list(map(str, solve(s, l, r)))))
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  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.
samples: [{"input": "abaaba\n    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\n    \n\nSince f(`abaaba`)=`abaababaab`, the first ten characters in f^{10^{100}}(S) is\nalso `abaababaab`. Thus, the sixth through the tenth characters are `abaab`.\nIn this string, `a` appears three times, `b` appears twice and no other\nletters appear, and thus the output should be 3 and 2 followed by twenty-four\n0s.\n\n* * *"}, {"input": "xx\n    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\n    \n\n* * *"}, {"input": "vgxgpuamkvgxgvgxgpuamkvgxg\n    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"}]