#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
string a, b;
int dp[2011][2011], len[2011];
int main() {
  if (fopen("data.in", "r")) freopen("data.in", "r", stdin);
  cin >> a;
  cin >> b;
  int l1 = a.size();
  int l2 = b.size();
  for (int i = 0; i < l1; i++) {
    int pos = i, cur = 0;
    while (pos < l1) {
      if (a[pos] == b[cur]) cur++;
      if (cur == l2) break;
      pos++;
    }
    if (cur == l2)
      len[i] = pos - i + 1;
    else
      len[i] = -1;
  }
  for (int i = 0; i < l1; i++) {
    for (int x = 0; x <= i; x++) {
      dp[i + 1][x + 1] = max(dp[i + 1][x + 1], dp[i][x]);
      dp[i + 1][x] = max(dp[i + 1][x], dp[i][x]);
      if (len[i] != -1)
        dp[i + len[i]][x + len[i] - l2] =
            max(dp[i + len[i]][x + len[i] - l2], dp[i][x] + 1);
    }
  }
  for (int i = 0; i <= l1; i++) cout << dp[l1][i] << " ";
  cout << endl;
  return 0;
}
