#include <bits/stdc++.h>
using namespace std;
int dp[2005][2005];
int nxt[2005];
string s, t;
int n, m;
int solve(int idx, int need) {
  if (need < 0) return -5000;
  if (n - idx < need) return -5000;
  if (idx == n) return 0;
  if (nxt[idx] == -1) return 0;
  int &ret = dp[idx][need];
  if (~ret) return ret;
  ret = solve(idx + 1, need);
  ret = max(ret, solve(idx + 1, need - 1));
  ret = max(ret, 1 + solve(nxt[idx], need - (nxt[idx] - idx - m)));
  return ret;
}
int main() {
  cin >> s >> t;
  n = s.size();
  m = t.size();
  for (int i = 0; i < n; i++) {
    int j = i, k = 0;
    while (j < n && k < m) {
      if (s[j] == t[k]) k++;
      j++;
    }
    nxt[i] = (k == m ? j : -1);
  }
  memset(dp, -1, sizeof dp);
  for (int i = 0; i <= n; i++) cout << solve(0, i) << (i == n ? '\n' : ' ');
  return 0;
}
