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 T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
string st, pat;
int bud_disi[2010];
void precal() {
  int i, j, cnt, s, k;
  for (i = 0; i < st.size(); i++) {
    s = i;
    cnt = 0;
    k = 0;
    while (s < st.size() && k < pat.size()) {
      if (st[s] == pat[k])
        k++;
      else
        cnt++;
      s++;
    }
    if (k == pat.size()) bud_disi[i] = cnt;
  }
}
int dp[2010][2010];
int solve(int pos, int baki) {
  if (baki < 0 || pos > st.size()) return -1 << 28;
  if (pos == st.size()) {
    if (baki == 0) return 0;
    return -1 << 28;
  }
  int &ret = dp[pos][baki];
  if (ret != -1) return ret;
  ret = -1 << 28;
  ret = max(ret, solve(pos + 1, baki));
  ret = max(ret, solve(pos + 1, baki - 1));
  if (bud_disi[pos] != -1)
    ret = max(
        ret, 1 + solve(pos + pat.size() + bud_disi[pos], baki - bud_disi[pos]));
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int i, j;
  memset(bud_disi, -1, sizeof(bud_disi));
  cin >> st >> pat;
  precal();
  memset(dp, -1, sizeof(dp));
  for (i = 0; i <= st.size(); i++) cout << solve(0, i) << " ";
  return 0;
}
