#include <bits/stdc++.h>
const int MX = 2222;
using namespace std;
char s1[MX], s2[MX];
int n, m, dp[MX][MX];
int nd(int i) {
  if (m > i) return MX;
  int top = m, ans = 0;
  if (i < m) return MX;
  while (top && i) {
    if (s1[i] == s2[top])
      --top;
    else
      ++ans;
    --i;
  }
  if (top)
    return MX;
  else
    return ans;
}
int main() {
  while (~scanf("%s%s", s1 + 1, s2 + 1)) {
    n = strlen(s1 + 1), m = strlen(s2 + 1);
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i <= n; i++)
      for (int j = i + 1; j <= n; j++) dp[i][j] = -MX;
    for (int i = 1; i <= n; i++) {
      int k = nd(i);
      for (int j = 0; j <= i; j++) {
        dp[i][j] = max(dp[i - 1][j], dp[i][j]);
        if (i - m - k >= 0 && j >= k)
          dp[i][j] = max(dp[i][j], dp[i - m - k][j - k] + 1);
      }
    }
    for (int i = 0; i <= n; i++) printf("%d ", dp[n][i]);
    puts("");
  }
  return 0;
}
