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", ""}.
#include <bits/stdc++.h>
using namespace std;
const int kN = 2 * 1000 + 10;
int matr[kN][kN];
int part_sums[kN][kN];
int mv[kN];
int dp[kN][kN];
int r[kN];
const int kInf = 1000 * 1000 * 1000;
string s, p;
int DP(int n, int x) {
  if (x < 0) {
    return -kInf;
  }
  if (n == 0 && x == 0) {
    return 0;
  }
  if (n == 0) {
    return -kInf;
  }
  if (dp[n][x] == -1) {
    dp[n][x] = -kInf;
    int index = mv[n - 1];
    if (index != -1) {
      int close_index = r[index];
      int del_cnt = close_index - index + 1 - p.length();
      dp[n][x] = DP(index, x - del_cnt) + 1;
    }
    dp[n][x] = max(dp[n][x], DP(n - 1, x));
    dp[n][x] = max(dp[n][x], DP(n - 1, x - 1));
  }
  return dp[n][x];
}
int main() {
  getline(cin, s);
  getline(cin, p);
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] != p[0]) {
      continue;
    }
    if (p.length() == 1) {
      matr[i][i] = 1;
      continue;
    }
    int len = 1;
    for (int j = i + 1; j < s.length(); ++j) {
      if (len < p.length() && s[j] == p[len]) {
        ++len;
      }
      if (len == p.length() && s[j] == p.back()) {
        matr[i][j] = 1;
      }
    }
  }
  int n = s.length();
  for (int i = 0; i < n; ++i) {
    part_sums[i][i] = matr[i][i];
    for (int j = i + 1; j < n; ++j)
      part_sums[i][j] = part_sums[i][j - 1] + matr[i][j];
  }
  for (int i = 0; i < n; ++i) {
    mv[i] = -1;
    for (int j = 0; j <= i; ++j) {
      if (part_sums[j][i] != 0) {
        mv[i] = j;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    r[i] = -1;
    for (int j = i; j < n; ++j) {
      if (matr[i][j]) {
        r[i] = j;
        break;
      }
    }
  }
  memset(dp, 255, sizeof(dp));
  for (int x = 0; x <= s.length(); ++x) {
    int ans = DP(n, x);
    int rest = (int)s.length() - ans * p.length();
    cout << ans << " ";
  }
  return 0;
}
