#include <bits/stdc++.h>
using namespace std;
const int N = 2005, mod = 1e9 + 7;
int dp[N][N];
char s[N], p[N];
int main() {
  int i, n, m, j, k, T, l, r;
  int ans, t, x, y;
  while (~scanf("%s%s", s + 1, p + 1)) {
    memset(dp, 0, sizeof dp);
    n = strlen(s + 1), m = strlen(p + 1);
    for (i = 1; i <= n; i++) {
      for (x = i, k = m; x && k; x--)
        if (s[x] == p[k]) k--;
      for (x++, j = 0; j <= i - m; j++)
        if (!k && j - i + x + m - 1 >= 0)
          dp[i][j] = dp[x - 1][j - i + x + m - 1] + 1;
      for (j = 0; j <= i; j++) {
        if (j) dp[i][j] = max(dp[i][j], dp[i - 1][j - 1]);
        dp[i][j] = max(dp[i][j], dp[i - 1][j]);
      }
    }
    for (i = 0; i <= n; i++) printf("%d ", dp[n][i]);
    printf("\n");
  }
  return 0;
}
