Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates <image> that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.

More formally, let's define <image> as maximum value of <image> over all s' that can be obtained by removing exactly x characters from s. Dreamoon wants to know <image> for all x from 0 to |s| where |s| denotes the length of string s.

Input

The first line of the input contains the string s (1 ≤ |s| ≤ 2 000).

The second line of the input contains the string p (1 ≤ |p| ≤ 500).

Both strings will only consist of lower case English letters.

Output

Print |s| + 1 space-separated integers in a single line representing the <image> for all x from 0 to |s|.

Examples

Input

aaaaa
aa


Output

2 2 1 1 0 0


Input

axbaxxb
ab


Output

0 1 1 2 1 1 0 0

Note

For the first sample, the corresponding optimal values of s' after removal 0 through |s| = 5 characters from s are {"aaaaa", "aaaa", "aaa", "aa", "a", ""}. 

For the second sample, possible corresponding optimal values of s' are {"axbaxxb", "abaxxb", "axbab", "abab", "aba", "ab", "a", ""}.
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    private static final int INF = 1000000000;
    int[][][] dp;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        char[] S = in.nextString().toCharArray();
        int N = S.length;
        char[] P = in.nextString().toCharArray();
        int M = P.length;
        int K = N / M + 1;
        dp = new int[N + 1][M][K];

        for (int i = 0; i <= N; i++) {
            for (int j = 0; j < M; j++) {
                for (int k = 0; k < K; k++) {
                    dp[i][j][k] = INF;
                }
            }
        }

        int[] min = new int[K];
        Arrays.fill(min, INF);

        dp[0][0][0] = 0;
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < M; j++) {
                for (int k = 0; k < K; k++) {
                    if (dp[i][j][k] < INF) {
                        int val = dp[i][j][k];
                        min[k] = Math.min(min[k], val);

                        if (S[i] == P[j]) {
                            int nj = j + 1;
                            int nk = k;
                            if (nj == M) {
                                nj = 0;
                                nk++;
                            }
                            dp[i + 1][nj][nk] = Math.min(dp[i + 1][nj][nk], dp[i][j][k]);
                        }

                        dp[i + 1][j][k] = Math.min(dp[i + 1][j][k], dp[i][j][k] + 1);
                        if (j == 0) {
                            dp[i + 1][j][k] = Math.min(dp[i + 1][j][k], dp[i][j][k]);
                        }
                    }
                }
            }
        }
        for (int j = 0; j < M; j++) {
            for (int k = 0; k < K; k++) {
                if (dp[N][j][k] < INF) {
                    int val = dp[N][j][k];
                    min[k] = Math.min(min[k], val);
                }
            }
        }

        int[] ans = new int[N + 1];
        for (int i = 0; i < K; i++) {
            int vmin = min[i];
            int vmax = N - i * M;
            for (int j = vmin; j <= vmax; j++) {
                ans[j] = Math.max(ans[j], i);
            }
        }

        for (int i = 0; i <= N; i++) {
            if (i > 0) {
                out.print(" ");
            }
            out.print(ans[i]);
        }
        out.println();
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

}

