#include <bits/stdc++.h>
using namespace std;
const int oo = 1000111000;
string s, p;
int f[2011][2011], res[2011];
void update(int &x, int val) { x = min(x, val); }
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(NULL);
  cout << (fixed) << setprecision(6);
  while (cin >> s >> p) {
    int ls = s.length(), lp = p.length();
    string initial_p = p;
    while (p.length() < ls) p += initial_p;
    for (int i = (0), _b = (ls); i <= _b; i++)
      for (int j = (0), _b = (ls); j <= _b; j++) f[i][j] = oo;
    f[0][0] = 0;
    for (int i = (0), _b = (ls - 1); i <= _b; i++)
      for (int j = (0), _b = (i); j <= _b; j++)
        if (f[i][j] < oo) {
          if (s[i] == p[j]) {
            update(f[i + 1][j + 1], f[i][j]);
          }
          if (j % lp == 0) {
            update(f[i + 1][j], f[i][j]);
          }
          update(f[i + 1][j], f[i][j] + 1);
        }
    memset(res, 0, sizeof res);
    for (int i = (ls), _b = (ls); i <= _b; i++)
      for (int j = (0), _b = (i); j <= _b; j++) {
        if (j % lp == 0) {
          int nn = f[i][j];
          int ln = ls - j;
          for (int x = (nn), _b = (ln); x <= _b; x++)
            res[x] = max(res[x], j / lp);
        }
      }
    for (int i = (0), _b = (ls); i <= _b; i++) cout << res[i] << ' ';
    cout << endl;
  }
  return 0;
}
