#include <bits/stdc++.h>
using namespace std;
string S, P;
int slen, plen;
int A[2005];
int dp[2005][2005];
int main() {
  cin >> S >> P;
  slen = S.size(), plen = P.size();
  for (int i = 0; i < slen; i++) {
    int sidx = i, pidx = 0;
    while (sidx < slen && pidx < plen) {
      if (S[sidx] == P[pidx]) pidx++;
      sidx++;
    }
    if (pidx == plen && sidx <= slen)
      A[i] = sidx;
    else
      A[i] = -1;
  }
  for (int i = 0; i < slen; 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] != -1)
        dp[A[i]][j + A[i] - i - plen] =
            max(dp[A[i]][j + A[i] - i - plen], dp[i][j] + 1);
    }
  for (int i = 0; i <= slen; i++) cout << dp[slen][i] << " ";
  return 0;
}
