#include <bits/stdc++.h>
using namespace std;
int dp[2010][2010], a[2010];
char str1[2010], str2[510];
int main() {
  gets(str1);
  gets(str2);
  int len1 = strlen(str1), len2 = strlen(str2);
  for (int i = 0; i < len1; i++) {
    int p = i, pp;
    for (pp = 0; pp < len2; pp++) {
      while (str1[p] != str2[pp] && p < len1) p++;
      if (p == len1)
        break;
      else
        p++;
    }
    if (pp == len2)
      a[i] = p - i;
    else
      a[i] = -1;
  }
  for (int i = 0; i < len1; i++) {
    for (int j = 0; j <= i; j++) {
      dp[i + 1][j] = max(dp[i][j], dp[i + 1][j]);
      dp[i + 1][j + 1] = max(dp[i][j], dp[i + 1][j + 1]);
      if (a[i] > 0)
        dp[i + a[i]][j + a[i] - len2] =
            max(dp[i + a[i]][j + a[i] - len2], dp[i][j] + 1);
    }
  }
  for (int i = 0; i <= len1; i++) printf("%d ", dp[len1][i]);
  printf("\n");
}
