Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates <image> that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.

More formally, let's define <image> as maximum value of <image> over all s' that can be obtained by removing exactly x characters from s. Dreamoon wants to know <image> for all x from 0 to |s| where |s| denotes the length of string s.

Input

The first line of the input contains the string s (1 ≤ |s| ≤ 2 000).

The second line of the input contains the string p (1 ≤ |p| ≤ 500).

Both strings will only consist of lower case English letters.

Output

Print |s| + 1 space-separated integers in a single line representing the <image> for all x from 0 to |s|.

Examples

Input

aaaaa
aa


Output

2 2 1 1 0 0


Input

axbaxxb
ab


Output

0 1 1 2 1 1 0 0

Note

For the first sample, the corresponding optimal values of s' after removal 0 through |s| = 5 characters from s are {"aaaaa", "aaaa", "aaa", "aa", "a", ""}. 

For the second sample, possible corresponding optimal values of s' are {"axbaxxb", "abaxxb", "axbab", "abab", "aba", "ab", "a", ""}.
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void maz(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void miz(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
inline int max(int a, int b) { return a > b ? a : b; }
void RI() {}
template <typename... T>
void RI(int &head, T &...tail) {
  scanf("%d", &head);
  RI(tail...);
}
const int N = 2100;
const double EPS = 1e-6;
int n, m, k;
int A[N];
char s[N], c[N];
int DP[N][510];
const long long mod = 1000000007;
void make() {
  n = strlen(s + 1);
  m = strlen(c + 1);
  for (int i = 1; i <= n; i++)
    if (s[i] == c[1]) DP[i][1] = i;
  for (int j = 2; j <= m; j++) {
    int last = 0;
    for (int i = 1; i <= n; i++) {
      if (s[i] == c[j]) DP[i][j] = last;
      maz(last, DP[i][j - 1]);
    }
  }
}
int dp[N][N];
const int INF = 1 << 30;
int ans[N];
int M[N][N];
void solve() {
  int K = n / m;
  for (int k = 1; k <= K; k++) {
    dp[k][0] = INF;
    for (int i = 1; i <= n; i++) {
      dp[k][i] = dp[k][i - 1];
      if (DP[i][m] != 0) {
        miz(dp[k][i], (i - DP[i][m] + 1 - m) + dp[k - 1][DP[i][m] - 1]);
      }
    }
  }
  for (int i = 0; i < n + 1; i++) ans[i] = 0;
  static int cnt = 0;
  for (int k = 1; k <= K; k++) {
    for (int i = 1; i <= n; i++) {
      if (dp[k][i] <= n - k * m) {
        M[dp[k][i]][k]++;
        M[n - k * m + 1][k]--;
      }
    }
  }
  fprintf(stderr, "%d\n", cnt);
  int now[N] = {};
  now[0] = INF;
  for (int i = 0; i < n + 1; i++) {
    for (int k = 1; k <= K; k++) now[k] += M[i][k];
    for (int k = K; k >= 0; k--)
      if (now[k] > 0) {
        ans[i] = k;
        break;
      }
  }
  for (int i = 0; i < n + 1; i++) printf("%d%c", ans[i], i == n ? '\n' : ' ');
}
int main() {
  scanf("%s%s", s + 1, c + 1);
  make();
  solve();
  return 0;
}
