#include <bits/stdc++.h>
double eps = 1e-9;
using namespace std;
const int maxn = 2016;
string a, b;
int n, m;
int arr[maxn];
int dp[maxn][maxn];
int main() {
  std::ios::sync_with_stdio(false);
  cin >> a >> b;
  n = a.size(), m = b.size();
  memset(arr, -1, sizeof(arr));
  for (int i = 0; i < n; i++) {
    if (a[i] != b[0]) {
      continue;
    }
    int p1 = 0, j;
    for (j = i; j < n; j++) {
      if (a[j] == b[p1]) {
        p1++;
        if (p1 == m) {
          break;
        }
      }
    }
    if (p1 == m) {
      arr[i] = j - i + 1;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j]);
      dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
      int len = arr[i];
      if (len == -1) {
        continue;
      }
      dp[i + len][j + len - m] = max(dp[i + len][j + len - m], dp[i][j] + 1);
    }
  }
  for (int i = 0; i <= n; i++) {
    cout << dp[n][i] << " ";
  }
  return 0;
}
