#include <bits/stdc++.h>
const int maxn = 2222;
using namespace std;
char s1[maxn], s2[maxn];
int dp[maxn][maxn];
int n, m;
int solve(int i) {
  int top = m;
  int rq = 0;
  if (i < m) return maxn;
  while (top && i) {
    if (s1[i] == s2[top])
      top--;
    else
      rq++;
    i--;
  }
  if (top)
    return maxn;
  else
    return rq;
}
int main() {
  scanf("%s%s", s1 + 1, s2 + 1);
  n = strlen(s1 + 1);
  m = strlen(s2 + 1);
  for (int i = 0; i <= n; i++)
    for (int j = i + 1; j <= n; j++) dp[i][j] = -maxn;
  for (int i = 1; i <= n; i++) {
    int k = solve(i);
    for (int j = 0; j <= i; j++) {
      dp[i][j] = max(dp[i - 1][j], dp[i][j]);
      if (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]);
  }
  return 0;
}
