#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  cin.sync_with_stdio(false);
  string s;
  string p;
  cin >> s >> p;
  int n = s.size();
  int p_len = p.size();
  vector<int> neededmiss(n + 1, 100000000);
  vector<vector<int>> sol(n + 1, vector<int>(n + 1, 0));
  for (int b = 0; b <= n; ++b) {
    bool ok = true;
    int miss = 0;
    for (int i = p_len - 1; i >= 0; --i) {
      int index = b - 1 - (p_len - 1) + i - miss;
      if (index < 0) {
        ok = false;
        break;
      }
      if (s[index] != p[i]) {
        ++i;
        ++miss;
      }
    }
    if (ok) {
      neededmiss[b] = miss;
    }
  }
  for (int x = 0; x <= n; ++x) {
    for (int b = 0; b <= n; ++b) {
      if (b < p_len + x) {
        sol[x][b] = 0;
      } else {
        sol[x][b] = sol[x][b - 1];
        if (neededmiss[b] <= x) {
          sol[x][b] = max(
              sol[x][b], 1 + sol[x - neededmiss[b]][b - p_len - neededmiss[b]]);
        }
      }
    }
    cout << sol[x][n] << " ";
  }
  cout << endl;
  return 0;
}
