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.*;

public class E {
    public static void main(String[] args) throws Exception {

        new E().solve();
    }

    void solve() throws IOException {
        FastScanner in = new FastScanner(System.in);

        String s = in.next();
        String p = in.next();

        int L = s.length();
        int[][] nci = new int[L + 1][26];
        Arrays.fill(nci[L], -1);
        for (int i = L - 1; i >= 0; i--) {
            for (int c = 0; c < 26; c++) {
                nci[i][c] = nci[i + 1][c];
            }
            nci[i][s.charAt(i) - 'a'] = i;
        }

        int[] ni = new int[L];
        int[] del = new int[L];
        for (int i = L - 1; i >= 0; i--) {
            if (s.charAt(i) == p.charAt(0)) {
                ni[i] = i;
                for (int k = 1; ni[i] != -1 && k < p.length(); k++) {
                    int next = nci[ni[i] + 1][p.charAt(k) - 'a'];
                    if (next == -1) {
                        ni[i] = -1;
                    } else {
                        del[i] += next - ni[i] - 1;
                        ni[i] = next;
                    }
                }

            } else {
                ni[i] = -1;
            }
        }

        int[][] dp = new int[L + 1][L + 1];
        Arrays.fill(dp[L], -1);
        dp[L][0] = 0;
        for (int i = L - 1; i >= 0; i--) {
            for (int k = 0; k < L + 1; k++) {
                dp[i][k] = dp[i + 1][k];
                if (k > 0) {
                    dp[i][k] = Math.max(dp[i][k], dp[i + 1][k - 1]);
                }

                if (ni[i] != -1 && k - del[i] >= 0 && dp[ni[i] + 1][k - del[i]] != -1) {

                    dp[i][k] = Math.max(dp[i][k], 1 + dp[ni[i] + 1][k - del[i]]);
                }
            }
        }

        StringBuilder sb = new StringBuilder();
        sb.append(dp[0][0]);
        for (int k = 1; k < L + 1; k++) {
            sb.append(" " + dp[0][k]);
        }
        System.out.println(sb);

    }
    class FastScanner {

        private InputStream _stream;
        private byte[] _buf = new byte[1024];
        private int _curChar;
        private int _numChars;
        private StringBuilder _sb = new StringBuilder();

        FastScanner(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 next() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            _sb.setLength(0);
            do {
                _sb.appendCodePoint(c);
                c = read();
            } while (!isWhitespace(c));
            return _sb.toString();
        }

        public int nextInt() {
            return (int) nextLong();
        }
        public long nextLong() {
            int c = read();
            while (isWhitespace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isWhitespace(c));
            return res * sgn;
        }

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

}
 	 	  	  				 	  	 	 	 		  	 	