#include <bits/stdc++.h>
using namespace std;
const int N = 2010;
string a, p;
int ans[N], DP[N][N];
int n, m, k, u, cur;
int maxi(int &u, int v) { u = max(u, v); }
int main() {
  getline(cin, a);
  getline(cin, p);
  n = a.length();
  m = p.length();
  a = " " + a;
  p = " " + p;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) DP[i][j] = (int)(1e9);
  DP[0][0] = 0;
  for (int i = 1; i <= n; i++) {
    k = m;
    u = -1;
    for (int j = i; j >= 1; j--) {
      if (a[j] == p[k]) k--;
      if (k == 0) {
        u = j - 1;
        break;
      }
    }
    for (int j = 0; j <= n / m; j++) {
      DP[i][j] = DP[i - 1][j];
      if (j > 0 && u != -1) DP[i][j] = min(DP[i][j], DP[u][j - 1] + i - u - m);
    }
  }
  for (int i = 1; i <= n / m; i++) {
    for (int j = DP[n][i]; j <= n - i * m; j++) ans[j] = max(ans[j], i);
  }
  for (int i = 0; i <= n; i++) cout << ans[i] << " ";
}
