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