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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author beginner1010
 */
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();
    }

    static class TaskC {
        final int INF = 1 << 29;
        String s;
        String pattern;
        int[] minIndex;
        int[][] dp;

        int findMinId(int posS) {
            int posP = 0;
            if (s.charAt(posS) != pattern.charAt(posP)) return -1;
            while (posS < s.length()) {
                if (s.charAt(posS) == pattern.charAt(posP)) {
                    posP++;
                    posS++;
                } else {
                    posS++;
                }
                if (posP == pattern.length()) return posS;
            }
            return -1;
        }

        int rec(int posS, int removed) {
            if (removed < 0) return -INF;
            if (posS == s.length())
                return removed == 0 ? 0 : -INF;
            int res = dp[posS][removed];
            if (res != -1) return res;
            res = rec(posS + 1, removed);
            res = Math.max(res, rec(posS + 1, removed - 1));
            if (minIndex[posS] != -1) {
                int newRemoved = minIndex[posS] - posS - pattern.length();
                res = Math.max(res, rec(minIndex[posS], removed - newRemoved) + 1);
            }
            return dp[posS][removed] = res;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            this.s = in.next();
            this.pattern = in.next();
            int n = s.length();
            minIndex = new int[n];
            for (int i = 0; i < n; i++) {
                minIndex[i] = findMinId(i);
            }
            dp = new int[n][n + 1];
            for (int[] dp1 : dp) {
                Arrays.fill(dp1, -1);
            }
            for (int remove = 0; remove <= n; remove++) {
                int res = rec(0, remove);
                if (remove != 0)
                    out.print(" ");
                out.print(res);
            }
            out.println();
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
}

