#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
int dp[maxn][maxn];
char s[maxn], p[maxn];
int main() {
  scanf("%s%s", s + 1, p + 1);
  int n1 = strlen(s + 1), n2 = strlen(p + 1);
  memset(dp, 0, sizeof(dp));
  for (int i = n2; i <= n1; i++) {
    int k = n2, t = i;
    while (t >= 1) {
      if (s[t] == p[k]) k--;
      if (k == 0) break;
      t--;
    }
    if (k == 0) {
      for (int j = 0; j <= i; j++)
        if (j >= i - t + 1 - n2 && t - 1 >= j + n2 - i + t - 1)
          dp[i][j] = dp[t - 1][j + n2 - i + t - 1] + 1;
    }
    for (int j = 0; j <= i; j++) dp[i][j] = max(dp[i][j], dp[i - 1][j]);
  }
  for (int i = 0; i < n1; i++) cout << dp[n1][i] << " ";
  cout << dp[n1][n1] << endl;
  return 0;
}
