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;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
int BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return (int)R;
}
string S, P;
int cut[2002];
int nextPos[2002];
void preProcess() {
  for (int i = 0; i < (int)S.size(); i++) {
    int reqCut = 0, k, j;
    for (j = 0, k = i; j < (int)P.size() && k < (int)S.size();) {
      if (P[j] == S[k])
        k++, j++;
      else
        reqCut++, k++;
    }
    if (j == (int)P.size())
      cut[i] = reqCut, nextPos[i] = k;
    else
      cut[i] = (1 << 25), nextPos[i] = (int)S.size() + 1;
  }
  return;
}
int dp[2002][2002];
int rec(int indx, int reqCut) {
  if (reqCut < 0) return -1 * (1 << 25);
  if (indx >= (int)S.size()) {
    if (reqCut == 0) return 0;
    return -1 * (1 << 25);
  }
  int &ret = dp[indx][reqCut];
  if (ret != -1) return ret;
  ret = -1 * (1 << 25);
  ret = max(ret, rec(indx + 1, reqCut));
  ret = max(ret, rec(indx + 1, reqCut - 1));
  if (cut[indx] < (1 << 25))
    ret = max(ret, rec(nextPos[indx], reqCut - cut[indx]) + 1);
  return ret;
}
int main(void) {
  cin >> S >> P;
  preProcess();
  memset(dp, -1, sizeof dp);
  for (int i = 0; i <= (int)S.size(); i++) {
    if (i)
      printf(" %d", max(0, rec(0, i)));
    else
      printf("%d", max(0, rec(0, 0)));
  }
  puts("");
  return 0;
}
