#include <bits/stdc++.h>
using namespace std;
string second, p;
int n, m;
int a[100000];
int d[2100][2100];
int main() {
  cin >> second >> p;
  n = second.size();
  m = p.size();
  for (int i = 0; i < n; i++) {
    int j = i, p1 = 0;
    for (p1 = 0; p1 < m; p1++) {
      while (p[p1] != second[j] && j < n) j++;
      if (j == n)
        break;
      else
        j++;
    }
    if (p1 == m)
      a[i] = j - i;
    else
      a[i] = -1;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      d[i + 1][j] = max(d[i + 1][j], d[i][j]);
      d[i + 1][j + 1] = max(d[i + 1][j + 1], d[i][j]);
      if (a[i] >= 0) {
        d[i + a[i]][j + a[i] - m] = max(d[i + a[i]][j + a[i] - m], d[i][j] + 1);
      }
    }
  }
  for (int i = 0; i <= n; i++) cout << d[n][i] << " ";
  return 0;
}
