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.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

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

class TaskE {

    char[] c;
    char[] pattern;
    int[] matchEndIdx;
    int[][] dp;
    int BAD = -9999999;

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        c = in.readString().toCharArray();
        pattern = in.readString().toCharArray();
        matchEndIdx = new int[c.length];
        for (int i = 0; i < c.length; i++) {
            matchEndIdx[i] = getMatchEndIdx(i, 0);
        }
        dp = new int[c.length + 1][c.length + 1];
        for (int[] x : dp) {
            Arrays.fill(x, -1);
        }
        for (int i = 0; i < c.length; i++) {
            out.print(findMaxOccurences(0, i) + " ");
        }
        out.printLine(0);
    }

    int findMaxOccurences(int stringIdx, int remainingDeletions) {
        if (stringIdx == c.length) {
            return (remainingDeletions == 0 ? 0 : BAD);
        }
        if (remainingDeletions < 0) {
            return BAD;
        }
        if (dp[stringIdx][remainingDeletions] != -1) {
            return dp[stringIdx][remainingDeletions];
        }
        int res = findMaxOccurences(stringIdx + 1, remainingDeletions);
        res = Math.max(res, findMaxOccurences(stringIdx + 1, remainingDeletions - 1));
        if (matchEndIdx[stringIdx] != -1) {
            int deletions = matchEndIdx[stringIdx] - stringIdx - pattern.length;
            if (deletions <= remainingDeletions) {
                int remainingOccurences = findMaxOccurences(matchEndIdx[stringIdx], remainingDeletions - deletions);
                res = Math.max(res, remainingOccurences + 1);
            }
        }
        return dp[stringIdx][remainingDeletions] = res;
    }

    int getMatchEndIdx(int strIdx, int patternIdx) {
        if (patternIdx == pattern.length) {
            return strIdx;
        }
        if (strIdx == c.length) {
            return -1;
        }
        return (c[strIdx] == pattern[patternIdx] ? getMatchEndIdx(strIdx + 1, patternIdx + 1) : getMatchEndIdx(strIdx + 1, patternIdx));
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    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 readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

