#include <bits/stdc++.h>
using namespace std;
char str1[2010], str2[2010];
int n1, n2;
void read() {
  scanf("%s %s", str1 + 1, str2 + 1);
  n1 = strlen(str1 + 1), n2 = strlen(str2 + 1);
}
void print() {
  static int dp[2010][2010], to[2010], cost[2010];
  for (int i = 1; i <= n1; ++i) {
    int j = 1, k = i;
    while (j <= n2 && k <= n1) {
      while (k <= n1 && str1[k] != str2[j]) ++k, ++cost[i];
      if (k <= n1) ++k, ++j;
    }
    if (j <= n2)
      cost[i] = 1 << 30;
    else
      to[i] = k;
  }
  for (int i = n1; i >= 1; --i)
    for (int j = 0; j <= n1 - i + 1; ++j) {
      dp[i][j] = dp[i + 1][j];
      if (j - cost[i] <= n1 - to[i] + 1 && j >= cost[i])
        dp[i][j] = max(dp[i][j], dp[to[i]][j - cost[i]] + 1);
    }
  for (int i = 0; i <= n1; ++i) printf("%d%c", dp[1][i], i < n1 ? ' ' : '\n');
}
int main() {
  read();
  print();
  return 0;
}
