#include <bits/stdc++.h>
using namespace std;
char str[2010], pattern[2010];
int dp[2010][2010];
int main(void) {
  scanf("%s", str);
  scanf("%s", pattern);
  int len1 = (int)strlen(str);
  int len2 = (int)strlen(pattern);
  for (int i = 1; i <= len1; ++i) {
    int k = len2, j = i;
    while (k > 0 && j > 0) {
      if (pattern[k - 1] == str[j - 1]) k--;
      j--;
    }
    if (k == 0) {
      int del = i - j - len2;
      for (int f = del; f <= i - len2; ++f)
        dp[i][f] = max(dp[i][f], dp[j][f - del] + 1);
    }
    for (int f = 0; f < i; ++f) dp[i][f] = max(dp[i][f], dp[i - 1][f]);
  }
  for (int i = 0; i <= len1; ++i) printf("%d ", dp[len1][i]);
  return 0;
}
