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;
long long POW(long long A, long long N, long long MOD) {
  if (N == 0) return 1 % MOD;
  if (N == 1) return A % MOD;
  long long tmp = POW(A, N / 2, MOD) % MOD;
  if (N % 2)
    return ((tmp * tmp) % MOD * A % MOD) % MOD;
  else
    return (tmp * tmp) % MOD;
}
long long MUL(long long A, long long B, long long MOD) {
  long long r = 0;
  while (B) {
    r = (r + (A * (B % 2) % MOD)) % MOD;
    A = (A + A) % MOD;
    B /= 2;
  }
  return r;
}
long long GCD(long long A, long long B) { return B == 0 ? A : GCD(B, A % B); }
int dx[] = {0, -1, 0, 1, 0};
int dy[] = {0, 0, 1, 0, -1};
template <class X, class Y>
bool minimize(X &x, const Y &y) {
  X eps = 1e-9;
  if (x > y + eps) {
    x = y;
    return true;
  } else
    return false;
}
template <class X, class Y>
bool maximize(X &x, const Y &y) {
  X eps = 1e-9;
  if (x + eps < y) {
    x = y;
    return true;
  } else
    return false;
}
template <class T>
T Abs(const T &x) {
  return (x < 0 ? -x : x);
}
const int MAXN = 2005;
const int oo = 1e9 + 7;
string S, P;
int N, M;
namespace SubtaskTRAU {
vector<vector<vector<int> > > dp;
int solve(int i, int re, int j) {
  if (i == N + 1) {
    if (re != 0) return -oo;
    return 0;
  }
  if (dp[i][re][j] != -1) return dp[i][re][j];
  int cur = -oo;
  if (re - 1 >= 0) cur = max(cur, solve(i + 1, re - 1, j));
  if (S[i] == P[j]) {
    if (j + 1 > M)
      cur = max(cur, solve(i + 1, re, 1) + 1);
    else
      cur = max(cur, solve(i + 1, re, j + 1));
    cur = max(cur, solve(i + 1, re, 1));
  } else
    cur = max(cur, solve(i + 1, re, 1));
  return dp[i][re][j] = cur;
}
void SOLVE() {
  dp.assign(N + 5, vector<vector<int> >(N + 5, vector<int>(M + 5, -1)));
  for (int re = (0), _b = (N); re <= _b; ++re) cout << solve(1, re, 1) << ' ';
  cout << '\n';
}
}  // namespace SubtaskTRAU
namespace SubtaskFULL {
int dp[MAXN][MAXN], f[MAXN];
void SOLVE() {
  for (int i = (1), _b = (N); i <= _b; ++i) {
    int cnt = 1;
    for (int j = (i), _b = (N); j <= _b; ++j) {
      if (S[j] == P[cnt]) ++cnt;
      if (cnt > M) {
        f[i] = j - i + 1;
        break;
      }
    }
  }
  for (int i = (0), _b = (N); i <= _b; ++i) {
    for (int j = (0), _b = (i); j <= _b; ++j) {
      maximize(dp[i + 1][j], dp[i][j]);
      maximize(dp[i + 1][j + 1], dp[i][j]);
      if (f[i + 1]) maximize(dp[i + f[i + 1]][j + f[i + 1] - M], dp[i][j] + 1);
    }
  }
  for (int i = (0), _b = (N); i <= _b; ++i) cout << dp[N][i] << ' ';
}
}  // namespace SubtaskFULL
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> S;
  S = " " + S;
  cin >> P;
  P = " " + P;
  N = S.size() - 1;
  M = P.size() - 1;
  SubtaskFULL ::SOLVE();
  return 0;
}
