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.*;
import java.util.*;
import java.util.List;

public class Main {
    private static StringTokenizer st;
    private static BufferedReader br;
    public static long MOD = 1000000007;
    public static long tenFive = 100000;
    public static int INF = 100000;

    public static void print(Object x) {
        System.out.println(x + "");
    }
    public static void printArr(long[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static void printArr(int[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static String join(List<?> x, String space) {
        StringBuilder sb = new StringBuilder();
        for (Object elt : x) {
            sb.append(elt);
            sb.append(space);
        }
        return sb.toString();
    }

    public static String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = br.readLine();
            st = new StringTokenizer(line.trim());
        }
        return st.nextToken();
    }
    public static int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public static List<Integer> nextInts(int N) throws IOException {
        List<Integer> ret = new ArrayList<Integer>();
        for (int i = 0; i < N; i++) {
            ret.add(nextInt() - 1);
        }
        return ret;
    }

    public static int matchIndex(char[] s, char[] p, int start) {
        int matched = 0;
        for (int i = start; i < s.length; i++) {
            if (s[i] == p[matched]) {
                matched++;
                if (matched == p.length) return i + 1;
            }
        }
        return -1;
    }

    public static int solve(int k, int i, int[][] state, int[] matches, int n, int m) {
        if (i >= n) {
            if (k == 0) return 0;
            return -INF;
        }
        if (state[k][i] == -1) {
            int soln = -INF;
            soln = Math.max(soln, solve(k, i+1, state, matches, n, m));
            if (k > 0) soln = Math.max(soln, solve(k-1, i+1, state, matches, n, m));
            if (matches[i] != -1) {
                int toRemove = matches[i] - i - m;
                if (toRemove <= k)
                    soln = Math.max(soln, 1 + solve(k-toRemove, matches[i], state, matches, n, m));
            }
            state[k][i] = soln;
        }
        //print(k + " removals at " + i + " is " + state[k][i]);
        return state[k][i];
    }

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));

        char[] s = nextToken().toCharArray();
        char[] p = nextToken().toCharArray();
        int n = s.length;
        int m = p.length;

        int[] matches = new int[n];
        for (int i = 0; i < n; i++) matches[i] = matchIndex(s, p, i);
        //printArr(matches);

        int[][] state = new int[n + 1][n + 1];
        for (int i = 0; i < n + 1; i++)
            for (int j = 0; j < n + 1; j++)
                state[i][j] = -1;

        List<Integer> ans = new ArrayList<Integer>();
        for (int i = 0; i <= n; i++) {
            ans.add(solve(i, 0, state, matches, n, m));
        }
        print(join(ans, " "));
    }
}
