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;
struct node {
  long long x;
  long long y;
};
long long gcd(long long a, long long b) {
  return b == 0 ? a : a > b ? gcd(b, a % b) : gcd(a, b % a);
}
bool myfunc(struct node a, struct node b) {
  if (a.x == b.x) {
    return a.y < b.y;
  } else {
    return a.x < b.x;
  }
}
set<int> occ;
void computeLPSArray(string pat, int M, int *lps);
void KMPSearch(string pat, string txt) {
  int M = pat.length();
  int N = txt.length();
  int *lps = (int *)malloc(sizeof(int) * M);
  int j = 0;
  computeLPSArray(pat, M, lps);
  int i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j == M) {
      occ.insert(i - j);
      j = lps[j - 1];
    } else if (i < N && pat[j] != txt[i]) {
      if (j != 0)
        j = lps[j - 1];
      else
        i = i + 1;
    }
  }
  free(lps);
}
void computeLPSArray(string pat, int M, int *lps) {
  int len = 0;
  int i;
  lps[0] = 0;
  i = 1;
  while (i < M) {
    if (pat[i] == pat[len]) {
      len++;
      lps[i] = len;
      i++;
    } else {
      if (len != 0) {
        len = lps[len - 1];
      } else {
        lps[i] = 0;
        i++;
      }
    }
  }
}
long long dp[2010][2010];
int len[10010];
int main() {
  string s, p;
  cin >> s >> p;
  int i, j;
  long long ans = 0;
  KMPSearch(p, s);
  int len1, len2;
  len1 = s.length();
  len2 = p.length();
  int k = 0;
  for (i = 0; i < len1; i++) {
    j = i;
    k = 0;
    while (j < len1) {
      while (j < len1 && s[j] != p[k]) {
        j++;
      }
      if (j == len1) {
        len[i] = -1;
        break;
      }
      k++;
      if (k == len2) {
        len[i] = j - i + 1;
        break;
      }
      j++;
    }
  }
  for (i = 0; i < len1; i++) {
    for (j = 0; j <= i; j++) {
      dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
      dp[i + 1][j + 1] = max(dp[i][j], dp[i + 1][j + 1]);
      if (len[i] >= 0) {
        dp[i + len[i]][j + len[i] - len2] =
            max(dp[i + len[i]][j + len[i] - len2], dp[i][j] + 1);
      }
    }
  }
  for (i = 0; i <= len1; i++) {
    ans = 0;
    ans = dp[len1][i];
    cout << ans << " ";
  }
  cout << endl;
  return 0;
}
