#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const double PI = 3.141592653589793238463;
const int INF = 0x3f3f3f3f;
const int INFS = 1000000001;
const long long LLINF = 9223372036854775807;
const long long M = 1000000007;
const double EPS = 1e-8;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, p;
  cin >> s >> p;
  long long n = s.size(), m = p.size();
  vector<long long> to(n), c(n);
  long long p1, p2;
  for (long long i = 0; i < n; i++) {
    to[i] = -1;
    c[i] = -1;
    p1 = i;
    p2 = 0;
    while (p1 < n && p2 < m) {
      if (s[p1] == p[p2]) ++p2;
      ++p1;
    }
    if (p2 == m) {
      to[i] = p1;
      c[i] = (p1 - i) - m;
    }
  }
  vector<vector<long long> > dp(n + 1, vector<long long>(n + 1, 0));
  for (long long j = n - 1; j > -1; j--) {
    dp[0][j] = dp[0][j + 1];
    if (c[j] == 0) dp[0][j] = max(dp[0][j], dp[c[j]][to[j]] + 1);
  }
  cout << dp[0][0] << ' ';
  for (long long i = 1; i < n + 1; i++) {
    for (long long j = n - 1; j > -1; j--) {
      dp[i][j] = max(dp[i][j + 1], dp[i - 1][j + 1]);
      if (c[j] != -1 && c[j] <= i && (c[j] + (n - to[j])) >= i)
        dp[i][j] = max(dp[i][j], dp[i - c[j]][to[j]] + 1);
    }
    cout << dp[i][0] << ' ';
  }
  cout << "\n";
  return 0;
}
