#include <bits/stdc++.h>
using namespace std;
string s, p;
int n, m, dp[2005][2005], a[2005];
int main() {
  int i, j, k;
  cin >> s >> p;
  n = s.length();
  m = p.length();
  for (i = 0; i < (n); i++) {
    j = i;
    k = 0;
    while (j < n && k < m) {
      if (s[j] == p[k]) k++;
      j++;
    }
    if (k == m)
      a[i] = j - i;
    else
      a[i] = -1;
  }
  for (i = 0; i < (n); i++) {
    for (j = 0; j < (i + 1); 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[i + a[i]][j + a[i] - m] =
            max(dp[i + a[i]][j + a[i] - m], dp[i][j] + 1);
    }
  }
  for (i = 0; i < (n + 1); i++) cout << dp[n][i] << " ";
  cout << endl;
  return 0;
}
