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 N = 2e3 + 3;
char s[N], st[N];
int d[N][N], cl[N][N], r[N];
int n, l;
int rek(int i, int x) {
  if (d[i][x] != -1) return d[i][x];
  if (i == n) {
    if (!x)
      cl[i][x] = true;
    else
      cl[i][x] = false;
    return d[i][x] = 0;
  }
  int j, k, t, zn;
  d[i][x] = 0;
  d[i][x] = rek(i + 1, x);
  cl[i][x] = cl[i + 1][x];
  j = r[i];
  t = x - (j - i - l);
  if ((j == n + 1) || (t < 0)) return d[i][x];
  zn = rek(j, t);
  if (cl[j][t]) {
    if (!cl[i][x]) {
      cl[i][x] = true;
      d[i][x] = 1 + zn;
    } else
      d[i][x] = max(d[i][x], 1 + zn);
  }
  return d[i][x];
}
int main() {
  if (0) {
    freopen("input.txt", "w", stdout);
    int n, p, i;
    n = 2e3;
    p = 500;
    for (i = 0; i < n; ++i) printf("a");
    printf("\n");
    for (i = 0; i < p; ++i) printf("a");
    printf("\n");
    return 0;
  }
  int i, ans, j, x, t, u;
  scanf("%s\n%s", s, st);
  n = strlen(s);
  l = strlen(st);
  for (i = 0; i < n; ++i) r[i] = n + 1;
  for (i = 0; i < n; ++i) {
    for (j = i, u = 0; (j < n) && (u < l); ++j)
      if (s[j] == st[u]) ++u;
    if (u == l) r[i] = j;
  }
  for (i = 0; i <= n; ++i)
    for (j = 0; j <= n; ++j) d[i][j] = -1;
  for (i = 0; i <= n; ++i)
    for (j = 0; j <= n; ++j) cl[i][j] = false;
  for (i = 0; i <= n; ++i) rek(0, i);
  for (x = 0; x <= n; ++x) {
    ans = 0;
    for (i = 0; i <= x; ++i) {
      t = d[0][i];
      if (t * l > n - x) t = (n - x) / l;
      ans = max(ans, t);
    }
    printf("%d ", ans);
  }
  printf("\n");
  return 0;
}
