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>
const int INF = (int)1e9 + 7;
char s[2020], t[2020];
int ls, lt;
int maxLen[2020][2020], minLen[2020][2020];
int fstMeet[2020], prev[2020][30];
inline void minimize(int &x, const int &y) {
  if (x > y) x = y;
}
inline void maximize(int &x, const int &y) {
  if (x < y) x = y;
}
void init(void) {
  scanf("%s", s + 1);
  scanf("%s", t + 1);
  ls = strlen(s + 1);
  lt = strlen(t + 1);
  for (int i = (2), _b = (ls); i <= _b; i = i + 1) {
    for (int j = 0, _n = (26); j < _n; j = j + 1) prev[i][j] = prev[i - 1][j];
    prev[i][s[i - 1] - 'a'] = i - 1;
  }
}
int fstPos(int pos) {
  if (s[pos] != t[lt]) return (-1);
  for (int i = (lt - 1), _a = (1); i >= _a; i = i - 1) {
    if (prev[pos][t[i] - 'a'] < 1) return (-1);
    pos = prev[pos][t[i] - 'a'];
  }
  return (pos);
}
void precount(void) {
  for (int i = (1), _b = (ls); i <= _b; i = i + 1) fstMeet[i] = fstPos(i);
  memset(maxLen, -1, sizeof maxLen);
  memset(minLen, 0x3f, sizeof minLen);
  maxLen[0][0] = minLen[0][0] = 0;
  for (int i = (1), _b = (ls); i <= _b; i = i + 1)
    for (int j = (0), _b = (ls); j <= _b; j = j + 1) {
      if (minLen[i - 1][j] < INF) minimize(minLen[i][j], minLen[i - 1][j]);
      if (maxLen[i - 1][j] >= 0) maximize(maxLen[i][j], maxLen[i - 1][j] + 1);
      if (fstMeet[i] > 0 && j > 0) {
        int k = fstMeet[i];
        if (minLen[k - 1][j - 1] < INF)
          minimize(minLen[i][j], minLen[k - 1][j - 1] + lt);
        if (maxLen[k - 1][j - 1] >= 0)
          maximize(maxLen[i][j], maxLen[k - 1][j - 1] + lt);
      }
    }
}
int answer(int x) {
  for (int i = (ls), _a = (1); i >= _a; i = i - 1)
    if (minLen[ls][i] <= x && x <= maxLen[ls][i]) return (i);
  return (0);
}
void process(void) {
  for (int i = (0), _b = (ls); i <= _b; i = i + 1)
    printf("%d ", answer(ls - i));
}
int main(void) {
  init();
  precount();
  process();
  return 0;
}
