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", ""}.
/*
     D    A    R    K    L      _                 _         O    R    D    D    A
         K                    / |                 | \        L    O    R         D
        A         R         _ / |                 | \ _       K    L         O    R
  D         A    R    K     _ / |         _       | \ _        L    O    R    D    D
      R    K    L       _ / _   |       _ | \\    |   _ \       O    R    D    D
     R         K        _ / _   |       _ | \ \   |   _ \        L    O    R
    D    A    R     _ / _ / |   /     /         \ \   | \ _ \ _        K    L    O
   D    D           _ / _ / |   /     /          \ \   | \ _ \ _             A
       K        _ / _ /     | /     /     _       \ \ |     \ _ \ _      L    O    R
 D    A        _ / _ /      | /     /     _       \ \ |      \ _ \ _      R         K
            _ / _ /         | |     |   |   \ (O) / | |         \ _ \ _         O
    D      _ / _ /          | |     |   |    \   /  | |          \ _ \ _         D
   A      / _ /     |   |   | \     |   \ _   \|/   / |   |   |     \ _ \
  K      / _ /      |   |   | \     |   \ _    V    / |   |   |      \ _ \         L
        / /         |   |   |   \ _ /       \ _ _ /   |   |   |         \ \
       / /          |   |   |                         |   | | |          \ \
      / /       |   | | \     \       ROWECHEN      /     / | |   |       \ \
     / /    _ _ |   | | \     \        ZHONG        /     / | |   | _ _    \ \
    / / _ /   \ | | | |   \ / \ \                 / / \ /   | | | | /   \ _ \ \
   / / _ /    \ | | | |       \ \                 / /       | | | | /    \ _ \ \
  / / /         \ \ \ \ /       /                 \       \ / / / /         \ \ \
 \ / /          \ \ \ \ /       /                 \       \ / / / /          \ \ /
  \|/             \|/         |         |         |           \|/             \|/
  L         O     \|/         |         |   |     |           \|/        R    D
 A    R    K    L             / _ |     |   | _     \      O    R    D    D    A    R
     L    O         R         / _ |     |   | _     \       D    D         A    R
    L    O    R    D        / / / _     | _ | | \ _   \      D    A    R         K
   O    R    D              / / / _ |   | _ | | \ _   \       D    A    R    K    L
  R    D    D    A    R     | / / | | / | | \ / | | \ |        K    L    O    R    D
 A         R         K      | / / | | / | | \ / | | \ |              L    O         R
     D    A         R         /   \ / | | | / | | / \ /     K    L         O    R
         D    D         A     /   \ / | | | / | | / \/            R    K    L    O
             R         D    D     / | / \ |   \ /        A    R    K    L    O    R
       D    A    R    K    L      / | / \ |    \/              O    R    D    D
 R    K    L    O    R    D       \ /     |      D    A    R         K    L    O    R
          D    A    R             \/      |            K    L    O    R    D    D

*/
//TEMPLATE V2
	import java.io.*;
	import java.util.*;

public class E476 {
    //Solution goes below: ------------------------------------
    public void solution() throws IOException{
        String s = nextLine(), p = nextLine();
        int s_len = s.length(), p_len = p.length();
        int[][] dp = new int[s_len+1][s_len+1];
        // dp[i][j] is the maximal number of p's we can find from the first i characters of s, deleting j characters.

        for (int i = 1; i<= s_len; i++) {
            // Computes the largest possible j such that s[j:i) contains p. (Includes j).
            int left = p_len, j = i - 1;
            for (; j >= 0 && left > 0; j--) if (s.charAt(j) == p.charAt(left - 1)) left--;
            j++; // j overshoots by 1.
            if (left != 0) continue; // dp[i][k] = 0, clearly.

            // In order to use the p contained in [j:i), we need to erase a bunch of letter.
            // There are i-j letters here. Only p_len are used. Thus we erased i-j-p_len.
            int erased = i - j - p_len;

            for (int k = 0; k <= i; k++) {
                if(k==0) dp[i][k] =dp[i - 1][k];
                else dp[i][k] = Math.max(dp[i - 1][k - 1], dp[i - 1][k]);
                // dp[i][k] = dp[i-1][k] if we don't erase.
                // dp[i][k] = dp[i-1][k-1] if we do.

                if (k >= erased && j>=k-erased) dp[i][k] = Math.max(dp[i][k], dp[j][k - erased] + 1);
            }
        }
//        for(int[] j:dp){
//            for(int i:j){
//                print(i);print(" ");
//            }
//            println();
//        }
        for(int i:dp[s_len]){
            print(i);print(" ");
        }
        println();
    }




    //Solution goes above: ------------------------------------
    public static final String IN_FILE = "";
    public static final String OUT_FILE = "";
    //-------------------- ------------------------------------
    //IO
    public static BufferedReader br;
    public static StringTokenizer st;
    public static BufferedWriter bw;
    public static void main(String[] args) throws IOException{
        if(IN_FILE==""){
            br = new BufferedReader(new InputStreamReader(System.in));
        }else{
            try {
                br = new BufferedReader(new FileReader(IN_FILE));
            } catch (FileNotFoundException e) {
                br = new BufferedReader(new InputStreamReader(System.in));
            }
        }
        if (OUT_FILE==""){
            bw = new BufferedWriter(new OutputStreamWriter(System.out));
        }else{
            try {
                bw = new BufferedWriter (new FileWriter(OUT_FILE) );
            } catch (FileNotFoundException e) {
                bw = new BufferedWriter(new OutputStreamWriter(System.out));
            }
        }
        (new E476()).solution();
        bw.close();//Flushes too.
    }

    public static String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    public static String nextLine() {
        st = null;
        try {
            return br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static int nextInt() {
        return Integer.parseInt(nextToken());
    }

    public static long nextLong() {
        return Long.parseLong(nextToken());
    }

    public static double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    public static void println(Object s) throws IOException{
        bw.write(s.toString()+"\n");
    }

    public static void println() throws IOException{
        bw.newLine();
    }

    public static void print(Object s) throws IOException{
        bw.write(s.toString());
    }
    public static void flush() throws IOException{//Useful for debug
        bw.flush();
    }
    //Other
    public static class Arr<T> extends ArrayList<T> {} //I hate typing ArrayList
}