#include <bits/stdc++.h>
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int MAXN = 2e3 + 5;
const double eps = 1e-9;
using namespace std;
char s[MAXN], p[MAXN];
int a[MAXN], dp[MAXN][MAXN];
int main() {
  scanf("%s %s", s, p);
  int n = strlen(s), m = strlen(p);
  for (int i = 0; i < n; i++) {
    if (i > 0 && a[i - 1] == -1) {
      a[i] = -1;
      continue;
    }
    int j = 0, k = i;
    while (k < n && j < m) {
      if (s[k] == p[j]) j++;
      k++;
    }
    if (j != m)
      a[i] = -1;
    else
      a[i] = k - i;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j]);
      if (a[i] >= 0 && i + a[i] <= n)
        dp[i + a[i]][j + a[i] - m] =
            max(dp[i + a[i]][j + a[i] - m], dp[i][j] + 1);
    }
  }
  for (int i = 0; i <= n; i++) printf("%d ", dp[n][i]);
  printf("\n");
  return 0;
}
