#include <bits/stdc++.h>
using namespace std;
int dp[2000][2001];
string s, s2;
int main() {
  cin >> s;
  cin >> s2;
  if (s.size() < s2.size()) {
    for (int i = 0; i <= s.size(); ++i) printf("0 ");
    return 0;
  }
  for (int i = 0; i < s.size(); ++i) {
    dp[i][0] = (i > 0 ? dp[i - 1][0] : 0);
    for (int j = 1; j <= i; ++j) {
      if (i == 0) break;
      dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - 1]);
    }
    int fi = i;
    int se = s2.size() - 1;
    for (; fi >= 0 && se >= 0;) {
      if (s[fi] == s2[se]) {
        --fi;
        --se;
      } else
        --fi;
    }
    if (se == -1) {
      for (int j = 0; j <= fi + 1; ++j) {
        dp[i][i - fi - s2.size() + j] =
            max(dp[i][i - fi - s2.size() + j], 1 + (fi >= 0 ? dp[fi][j] : 0));
      }
    }
  }
  for (int i = 0; i <= s.size(); ++i) {
    printf("%d ", dp[s.size() - 1][i]);
  }
  return 0;
}
