#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
char s1[maxn], s2[maxn];
int dp[maxn][maxn];
int len1, len2;
int solve(int x) {
  if (x < len2) return maxn;
  int a = x, b = len2, tmp = 0;
  while (a && b) {
    if (s1[a] == s2[b])
      a--, b--;
    else
      tmp++, a--;
  }
  if (b == 0)
    return tmp;
  else
    return maxn;
}
int main() {
  scanf("%s%s", s1 + 1, s2 + 1);
  len1 = strlen(s1 + 1);
  len2 = strlen(s2 + 1);
  for (int i = 0; i <= len1; i++)
    for (int j = 0; j <= len1; j++)
      if (j > i) dp[i][j] = -3000;
  for (int i = 1; i <= len1; i++) {
    int x = solve(i);
    for (int k = 0; k <= len1; k++) dp[i][k] = max(dp[i][k], dp[i - 1][k]);
    for (int k = 0; k <= len1; k++)
      if (x <= k) dp[i][k] = max(dp[i][k], dp[i - x - len2][k - x] + 1);
  }
  for (int i = 0; i <= len1; i++) printf("%d ", dp[len1][i]);
  printf("\n");
}
