#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s1, s2;
  cin >> s1 >> s2;
  int l1 = s1.length();
  int l2 = s2.length();
  int match[l1];
  for (int(i) = 0; (i) < (l1); (i)++) match[i] = -1;
  for (int(i) = 0; (i) < (l1); (i)++) {
    int cnt = 0;
    int id = 0;
    for (int(j) = (i); (j) < (l1); (j)++) {
      if (s1[j] == s2[id]) {
        id += 1;
        if (id == l2) {
          match[i] = j;
          break;
        }
      }
    }
  }
  int dp[l1 + 1][l1 + 1];
  memset(dp, (0), sizeof(dp));
  for (int(i) = 0; (i) < (l1); (i)++)
    for (int(j) = 0; (j) < (i + 1); (j)++) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j]);
      if (match[i] != -1)
        dp[match[i] + 1][j + (1 + match[i] - i) - l2] =
            max(dp[match[i]][j + (1 + match[i] - i) - l2], 1 + dp[i][j]);
    }
  for (int(i) = 0; (i) < (l1 + 1); (i)++) cout << dp[l1][i] << " ";
  return 0;
}
