#include <bits/stdc++.h>
using namespace std;
int sgn(double x) { return (x > 1e-8) - (x < -1e-8); }
int count_bit(int x) { return x == 0 ? 0 : count_bit(x >> 1) + (x & 1); }
template <class T>
inline void ckmin(T &a, const T b) {
  if (b < a) a = b;
}
template <class T>
inline void ckmax(T &a, const T b) {
  if (b > a) a = b;
}
const int MAXS = 2000 + 10;
const int MAXT = 500 + 10;
char S[MAXS], T[MAXT];
int minlen[MAXS], dp[MAXS][MAXS];
void update(int &x, int y) { x = max(x, y); }
int main() {
  while (scanf("%s%s", S, T) != EOF) {
    int lens = strlen(S), lent = strlen(T);
    for (int i = 0; i < lens; ++i) {
      int pi = i;
      bool fail = false;
      for (int j = 0; j < lent; ++j) {
        while (pi < lens && S[pi] != T[j]) {
          ++pi;
        }
        if (pi == lens) {
          fail = true;
        }
        ++pi;
      }
      if (!fail) {
        minlen[i] = pi - i;
      } else {
        minlen[i] = -1;
      }
    }
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i < lens; ++i) {
      for (int j = 0; j <= i; ++j) {
        update(dp[i + 1][j], dp[i][j]);
        update(dp[i + 1][j + 1], dp[i][j]);
        if (minlen[i] != -1) {
          update(dp[i + minlen[i]][j + minlen[i] - lent], dp[i][j] + 1);
        }
      }
    }
    for (int i = 0; i <= lens; ++i) {
      printf("%d%c", dp[lens][i], " \n"[i == lens]);
    }
  }
  return 0;
}
