/+ dub.sdl:
    name "F"
    dependency "dcomp" version=">=0.6.0"
+/

import std.stdio, std.algorithm, std.range, std.conv;
// import dcomp.foundation, dcomp.scanner;

// import dcomp.datastructure.lazyseg;

int[] mp(T)(T s) {
    int n = s.length.to!int;
    int[] R = new int[n+1]; R[0] = -1;
    for (int i = 0, j = -1; i < n; i++) {
        while (j >= 0 && s[i] != s[j]) j = R[j];
        j++;
        R[i+1] = j;
    }
    return R;
}

long[26] solve(char[] s1, char[] s2, long l) {
    immutable long INF = 10L^^18 + 10L^^16;
    debug writeln(s1, " ", s2, " ", l);
    long[200] len;
    long[26][200] all;
    len[0] = s1.length;
    len[1] = s2.length;
    s1.each!(x => all[0][x-'a']++);
    s2.each!(x => all[1][x-'a']++);
    foreach (i; 2..200) {
        len[i] = len[i-1] + len[i-2];
        len[i] = min(len[i], INF);
        all[i][] = all[i-1][] + all[i-2][];
        all[i][].each!((ref x) => x = min(x, INF));
    }
    long[26] cnt;
    void dfs(long b, int dp) {
        if (b <= 0) return;
        if (len[dp] <= b) {
            cnt[] += all[dp][];
            return;
        }
        if (dp == 0) {
            iota(b).each!(i => cnt[s1[i]-'a']++);
            return;
        }
        if (dp == 1) {
            iota(b).each!(i => cnt[s2[i]-'a']++);            
            return;
        }
        dfs(b, dp-1);
        dfs(b - len[dp-1], dp-2);
    }
    dfs(l, 199);
    debug writeln(cnt);
    return cnt;
}

long[26] solve_ex(char[] s1, long l) {
    int n = s1.length.to!int;
    long[26] cnt;
    foreach (i, d; s1) {
        cnt[d-'a'] += (l-i+n-1)/n;
    }
    return cnt;
}

int main() {
    auto sc = new Scanner(stdin);
    char[] s;
    long l, r;
    sc.read(s, l, r);
    int n = s.length.to!int;
    long[26] cnt;
    if (s.mp[n/2] == 0) {
        //xx, xxxx, xxxxxx, ...
        cnt[] += solve_ex(s[0..n/2], r)[];
        cnt[] -= solve_ex(s[0..n/2], l-1)[];
    } else {
        cnt[] += solve(s[0..n/2], s[0..n-s.mp[n/2]], r)[];
        cnt[] -= solve(s[0..n/2], s[0..n-s.mp[n/2]], l-1)[];
    }
    writeln(cnt[].map!(to!string).join(" "));
    return 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/foundation.d */
// module dcomp.foundation;
 
static if (__VERSION__ <= 2070) {
    template fold(fun...) if (fun.length >= 1) {
        auto fold(R, S...)(R r, S seed) {
            import std.algorithm : reduce;
            static if (S.length < 2) {
                return reduce!fun(seed, r);
            } else {
                import std.typecons : tuple;
                return reduce!fun(tuple(seed), r);
            }
        }
    }
     
}
version (X86) static if (__VERSION__ < 2071) {
    import core.bitop : bsf, bsr, popcnt;
    int bsf(ulong v) {
        foreach (i; 0..64) {
            if (v & (1UL << i)) return i;
        }
        return -1;
    }
    int bsr(ulong v) {
        foreach_reverse (i; 0..64) {
            if (v & (1UL << i)) return i;
        }
        return -1;   
    }
    int popcnt(ulong v) {
        int c = 0;
        foreach (i; 0..64) {
            if (v & (1UL << i)) c++;
        }
        return c;
    }
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

class Scanner {
    import std.stdio : File;
    import std.conv : to;
    import std.range : front, popFront, array, ElementType;
    import std.array : split;
    import std.traits : isSomeChar, isStaticArray, isArray; 
    import std.algorithm : map;
    File f;
    this(File f) {
        this.f = f;
    }
    char[512] lineBuf;
    char[] line;
    private bool succ() {
        import std.range.primitives : empty, front, popFront;
        import std.ascii : isWhite;
        while (true) {
            while (!line.empty && line.front.isWhite) {
                line.popFront;
            }
            if (!line.empty) break;
            if (f.eof) return false;
            line = lineBuf[];
            f.readln(line);
        }
        return true;
    }

    private bool readSingle(T)(ref T x) {
        import std.algorithm : findSplitBefore;
        import std.string : strip;
        import std.conv : parse;
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                 
                 
                auto r = line.findSplitBefore(" ");
                x = r[0].strip.dup;
                line = r[1];
            } else {
                auto buf = line.split.map!(to!E).array;
                static if (isStaticArray!T) {
                     
                    assert(buf.length == T.length);
                }
                x = buf;
                line.length = 0;
            }
        } else {
            x = line.parse!T;
        }
        return true;
    }
    int read(T, Args...)(ref T x, auto ref Args args) {
        if (!readSingle(x)) return 0;
        static if (args.length == 0) {
            return 1;
        } else {
            return 1 + read(args);
        }
    }
}



 

 
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/datastructure/lazyseg.d */
// module dcomp.datastructure.lazyseg;

 
struct LazySeg(T, L, alias opTT, alias opTL, alias opLL, T eT, L eL) {
    const int n, sz, lg;
    T[] d;
    L[] lz;
    @disable this();
    this(int n) {
        import std.algorithm : fill, each;
        import core.bitop : bsr;
        if (n == 0) return;
        int lg = n.bsr;
        if ((2^^lg) < n) lg++;
        this.n = n;
        this.sz = 2^^lg;
        this.lg = lg;
        d = new T[](2*this.sz);
        d.each!((ref x) => x = eT);
        lz = new L[](2*this.sz);
        lz.each!((ref x) => x = eL);
    }
    private void lzAdd(int k, L x) {
        d[k] = opTL(d[k], x);
        lz[k] = opLL(lz[k], x);
    }
    private void push(int k) {
        if (lz[k] == eL) return;
        lzAdd(2*k, lz[k]);
        lzAdd(2*k+1, lz[k]);
        lz[k] = eL;
    }
     
    T sum(int a, int b, int l, int r, int k) {
        if (b <= l || r <= a) return eT;
        if (a <= l && r <= b) return d[k];
        push(k);
        int md = (l+r)/2;
        return opTT(sum(a, b, l, md, 2*k),
            sum(a, b, md, r, 2*k+1));
    }
    T single(int k) {
        k += sz;
        foreach_reverse (int i; 1..lg+1) {
            push(k>>i);
        }
        return d[k];
    }
    void singleSet(T x, int k) {
        k += sz;
        foreach_reverse (int i; 1..lg+1) {
            push(k>>i);
        }
        d[k] = x;
        foreach (int i; 1..lg+1) {
            d[k>>i] = opTT(d[2*(k>>i)], d[2*(k>>i)+1]);
        }
    }
    T sum(int a, int b) {
        assert(0 <= a && a <= b && b <= n);
        return sum(a, b, 0, sz, 1);
    }
    void add(int a, int b, L x, int l, int r, int k) {
        if (b <= l || r <= a) return;
        if (a <= l && r <= b) {
            lzAdd(k, x);
            return;
        }
        push(k);
        int md = (l+r)/2;
        add(a, b, x, l, md, 2*k);
        add(a, b, x, md, r, 2*k+1);
        d[k] = opTT(d[2*k], d[2*k+1]);
    }
    void add(int a, int b, L x) {
        assert(0 <= a && a <= b && b <= n);
        add(a, b, x, 0, sz, 1);
    }
    @property int opDollar() const {return sz;}
    struct Range {
        LazySeg* seg;
        int start, end;
        @property T sum() {
            return seg.sum(start, end);
        }
    }
    T opIndex(int k) {
        assert(0 <= k && k < n);
        return single(k);
    }
    void opIndexAssign(T x, int k) {
        assert(0 <= k && k < n);
        singleSet(x, k);
    }
    int[2] opSlice(size_t dim)(int start, int end) {
        assert(0 <= start && start <= end && end <= sz);
        return [start, end];
    }
    Range opIndex(int[2] rng) {
        return Range(&this, rng[0], rng[1]);
    }
    void opIndexOpAssign(string op : "+")(L x, int[2] rng) {
        add(rng[0], rng[1], x);
    }
}

 
 
 


Measured memory_bytes: 4024