Suppose you have two strings *s* and *t*, and their length is equal. You may perform the following operation any number of times: choose two different characters *c*<sub class="lower-index">1</sub> and *c*<sub class="lower-index">2</sub>, and replace every occurence of *c*<sub class="lower-index">1</sub> in both strings with *c*<sub class="lower-index">2</sub>. Let's denote the distance between strings *s* and *t* as the minimum number of operations required to make these strings equal. For example, if *s* is abcd and *t* is ddcb, the distance between them is 2 — we may replace every occurence of a with b, so *s* becomes bbcd, and then we may replace every occurence of b with d, so both strings become ddcd.

You are given two strings *S* and *T*. For every substring of *S* consisting of |*T*| characters you have to determine the distance between this substring and *T*.
The first line contains the string *S*, and the second — the string *T* (1 ≤ |*T*| ≤ |*S*| ≤ 125000). Both strings consist of lowercase Latin letters from a to f.
none
abcdefa
ddcb
2 3 3 3 
import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def ntt(f, l, x, r, mod):
    u, v = 1, l // 2
    x0 = x
    while v:
        y = [1]
        for _ in range(v):
            y.append(y[-1] * r[x0] % mod)
        for i in range(u):
            a = 2 * i * v
            b = a + v
            for j in range(v):
                fa, fb = f[a + j], f[b + j]
                f[a + j] = (fa + fb) % mod
                f[b + j] = (fa - fb) * y[j] % mod
        u *= 2
        v //= 2
        x0 -= 1
    return

def intt(f, l, ir, mod):
    u, v = 1, l // 2
    x0 = 1
    while v:
        y = [1]
        for _ in range(u):
            y.append(y[-1] * ir[x0] % mod)
        for i in range(v):
            a = 2 * i * u
            b = a + u
            for j in range(u):
                fa, fb = f[a + j], f[b + j]
                f[a + j] = (fa + fb * y[j]) % mod
                f[b + j] = (fa - fb * y[j]) % mod
        u *= 2
        v //= 2
        x0 += 1
    return

def fft(f, g, lc):
    lf, lg = len(f), len(g)
    c = lf + lg - 1
    x = len(bin(c)) - 2
    m = pow(2, x)
    f += [0] * (m - lf)
    g += [0] * (m - lg)
    ntt(f, m, x, r, mod)
    ntt(g, m, x, r, mod)
    fg = [i * j % mod for i, j in zip(f, g)]
    intt(fg, m, ir, mod)
    im = pow(m, mod - 2, mod)
    ans = [fg[i] * im % mod for i in range(lc)]
    return ans

mod, y = 998244353, 3
r = [pow(y, (mod - 1) >> i, mod) for i in range(21)]
ir = [pow(i, mod - 2, mod) for i in r]

def get_root(s, root, rank):
    v = []
    while not s == root[s]:
        v.append(s)
        s = root[s]
    for i in v:
        root[i] = s
    return s

def unite(s, t, root, rank):
    rs, rt = get_root(s, root, rank), get_root(t, root, rank)
    if not rs ^ rt:
        return
    if rank[s] == rank[t]:
        rank[rs] += 1
    if rank[s] >= rank[t]:
        root[rt] = rs
    else:
        root[rs] = rt
    return

def same(s, t, root, rank):
    return True if get_root(s, root, rank) == get_root(t, root, rank) else False

s = list(input().rstrip())
t = list(input().rstrip())
ls, lt = len(s), len(t)
t.reverse()
n = ls - lt + 1
root = [[i for i in range(6)] for _ in range(n)] 
rank = [[1 for _ in range(6)] for _ in range(n)]
s0 = [[] for _ in range(6)]
for i in range(ls):
    s0[s[i] - 97].append(i)
t0 = [[] for _ in range(6)]
for i in range(lt):
    t0[t[i] - 97].append(i)
for i in range(6):
    for j in range(6):
        if not i ^ j:
            continue
        f, g = [0] * ls, [0] * lt
        for k in s0[i]:
            f[k] = 1
        for k in t0[j]:
            g[k] = 1
        fl = fft(f, g, ls)
        for k in range(n):
            if not fl[k + lt - 1]:
                continue
            unite(i, j, root[k], rank[k])
ans = []
cnt = [0] * 6
for i in range(n):
    rooti, ranki = root[i], rank[i]
    for j in range(6):
        cnt[get_root(j, rooti, ranki)] += 1
    ans0 = 0
    for j in range(6):
        ans0 += max(cnt[j] - 1, 0)
        cnt[j] = 0
    ans.append(ans0)
sys.stdout.write(" ".join(map(str, ans)))