#include <bits/stdc++.h>
using namespace std;
const int maxn = 2048;
int ps, a[maxn], n, m, i, j, f[maxn][maxn];
char s[maxn], p[maxn];
int main() {
  scanf("%s%s", s, p);
  n = strlen(s), m = strlen(p);
  for (i = 0; i < n; ++i) {
    ps = i;
    for (j = 0; j < m; ++j) {
      while (ps < n && p[j] != s[ps]) ++ps;
      if (ps == n)
        break;
      else
        ++ps;
    }
    a[i] = ((j == m) ? ps - i : -1);
  }
  for (i = 0; i < n; ++i) {
    for (j = 0; j <= i; ++j) {
      f[i + 1][j] = max(f[i + 1][j], f[i][j]),
            f[i + 1][j + 1] = max(f[i + 1][j + 1], f[i][j]);
      if (a[i] >= 0)
        f[i + a[i]][j + a[i] - m] = max(f[i + a[i]][j + a[i] - m], f[i][j] + 1);
    }
  }
  for (i = 0; i <= n; ++i) printf("%d ", f[n][i]);
  return 0;
}
