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 ll = long long;
const ll mod = 1e9 + 7;
const ll N = 3005;
const int base = 400;
using ull = unsigned long long;
using namespace std;
ll n, m, t, k, T, a[N], fe[N], ans, st[N * 4], u, v, b[N], dp[N][N], c[N];
vector<ll> adj[25], res, kq;
vector<pair<ll, ll> > adt[25];
void add(ll id, ll val) {
  for (; id <= n; id += id & -id) fe[id] += val;
}
ll get(ll id) {
  ll total = 0;
  for (; id; id -= id & -id) total += fe[id];
  return total;
}
ll gcd(ll u, ll v) {
  while (v != 0) {
    ll p = u % v;
    u = v;
    v = p;
  }
  return u;
}
ll cnp(ll x) {
  ll lf = 1, rt = m, mid;
  while (lf <= rt) {
    mid = (lf + rt) / 2;
    if (fe[mid] < x)
      lf = mid + 1;
    else
      rt = mid - 1;
  }
  return lf;
}
ll pw(ll k, ll n) {
  ll total = 1;
  for (; n; n >>= 1) {
    if (n & 1) total = (total * k) % mod;
    k = (k * k) % mod;
  }
  return total;
}
void update(ll id, ll l, ll r) {
  if (l == r) {
    st[id] = (st[id] + v) % mod;
    return;
  }
  ll mid = (l + r) / 2;
  if (mid >= u)
    update(id * 2, l, mid);
  else
    update(id * 2 + 1, mid + 1, r);
  st[id] = (st[id * 2] + st[id * 2 + 1]) % mod;
}
ll get(ll id, ll l, ll r) {
  if (u <= l && r <= v) return st[id];
  if (u > r || l > v) return 0;
  ll mid = (l + r) / 2;
  return (get(id * 2, l, mid) + get(id * 2 + 1, mid + 1, r)) % mod;
}
ll C(ll u, ll v) {
  if (u > v) return 0;
  return a[v] * b[u] % mod * b[v - u] % mod;
}
string s, p;
void sol() {
  cin >> s >> p;
  n = s.length();
  m = p.length();
  s = " " + s;
  p = " " + p;
  for (int i = 1; i <= n; i++) {
    int len = 1;
    a[i] = -1;
    for (int j = i; j <= n; j++) {
      if (s[j] == p[len]) ++len;
      if (len > m) {
        a[i] = j - i + 1 - m;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; 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 (a[i + 1] != -1)
        dp[i + a[i + 1] + m][j + a[i + 1]] =
            max(dp[i + a[i + 1] + m][j + a[i + 1]], dp[i][j] + 1);
    }
  }
  for (int i = 0; i <= n; i++) cout << dp[n][i] << " ";
}
int main() {
  if (fopen("pieaters"
            ".inp",
            "r")) {
    freopen(
        "pieaters"
        ".inp",
        "r", stdin);
    freopen(
        "pieaters"
        ".out",
        "w", stdout);
  }
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int ntest;
  ntest = 1;
  while (ntest-- > 0) sol();
}
