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;
const long long mod = 1e9 + 7;
const int inf = 1e9 + 7;
const long long infL = 1e18;
int setbit(int n, int pos) { return n = n | (1 << pos); }
int resetbit(int n, int pos) { return n = n & ~(1 << pos); }
bool checkbit(int n, int pos) { return (bool)(n & (1 << pos)); }
template <typename T>
T mul(T x, T y) {
  x %= mod;
  y %= mod;
  return (x * y) % mod;
}
template <typename T>
T add(T x, T y) {
  x %= mod;
  y %= mod;
  return (x + y) % mod;
}
template <typename T>
T modPow(T x, T k, T mod) {
  if (k == 0) return 1;
  if (k & 1) {
    return ((x % mod) * modPow(x, k - 1, mod) % mod) % mod;
  } else {
    T ret = modPow(x, k / 2, mod);
    ret %= mod;
    return (ret * ret) % mod;
  }
}
template <typename T>
T ext_gcd(T num1, T num2, T &X, T &Y) {
  T r2, r1, q2, q1, x2, x1, y2, y1, x, y, r;
  x2 = 1;
  y2 = 0;
  x1 = 0;
  y1 = 1;
  for (r2 = num1, r1 = num2; r1 != 0;
       y2 = y1, y1 = y, x2 = x1, x1 = x, r2 = r1, r1 = r) {
    q1 = r2 / r1;
    x = x2 - q1 * x1;
    y = y2 - q1 * y1;
    r = r2 % r1;
  }
  X = x2;
  Y = y2;
  return r2;
}
template <typename T>
T modInv(T x, T m) {
  return modPow(x, m - 2, m);
}
template <typename T>
void print(const T &v) {
  cerr << v << ' ';
}
template <typename T1, typename... T2>
void print(const T1 &first, const T2 &...rest) {
  print(first);
  print(rest...);
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const pair<F, S> &p) {
  return os << "[ " << p.first << ", " << p.second << " ]";
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "[ ";
  for (int i = 0; i < v.size(); i++) os << v[i] << ' ';
  return os << " ]";
}
const int M = (int)1e5 + 77;
const int mx = (int)700;
const int nx = 2000 + 77;
int dp[nx + 2][nx + 2], nxt[nx + 2];
string s1, s2;
int func(int i, int cnt) {
  if (cnt < 0) return -inf;
  if (i >= s1.size()) {
    if (cnt == 0) return 0;
    return -inf;
  }
  int &ans = dp[i][cnt];
  if (ans != -1) return ans;
  ans = -inf;
  ans = max(ans, func(i + 1, cnt));
  ans = max(ans, func(i + 1, cnt - 1));
  int k = 0, j, f = 0, c = 0;
  if (nxt[i] != -1) {
    c = nxt[i] - i - s2.size();
    ans = max(ans, func(nxt[i], cnt - c) + 1);
  }
  return ans;
}
void solve() {
  int n, q, x, y, cnt;
  cin >> s1 >> s2;
  memset(dp, -1, sizeof dp);
  for (int i = 0; i < s1.size(); i++) {
    int j = i, k = 0, f = 0;
    while (j < s1.size()) {
      if (s1[j] == s2[k]) {
        j++;
        k++;
      } else {
        j++;
      }
      if (k >= s2.size()) {
        f = 1;
        break;
      }
    }
    if (f)
      nxt[i] = j;
    else
      nxt[i] = -1;
  }
  for (int i = 0; i < s1.size() + 1; i++) {
    cout << func(0, i) << ' ';
  }
}
int main() {
  int t = 1, c = 0;
  while (t--) {
    solve();
  }
}
