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;
inline int add(int a, int b, int m = 1000000007) {
  a += b;
  if (a >= m) a -= m;
  return a;
}
inline int mul(int a, int b, int m = 1000000007) {
  return (int)(((long long)a * (long long)b) % m);
}
inline int norm(int x, int m = 1000000007) {
  if (x >= m) x %= m;
  if (x < 0) x += m;
  return x;
}
inline int neg(int x, int m = 1000000007) {
  x = -x;
  return norm(x);
}
string s, p;
int ns, np;
int pos[2001];
int dp[2001][2001];
int f(int i, int x) {
  if (x < 0 or i < 0) return -1000000007;
  if (i == ns) return x == 0 ? 0 : -1000000007;
  int &ans = dp[i][x];
  if (ans != -1) return ans;
  ans = -1000000007;
  ans = max({ans, f(pos[i] + 1, x - (pos[i] - i + 1 - np)) + 1, f(i + 1, x),
             f(i + 1, x - 1)});
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> p;
  ns = s.length(), np = p.length();
  for (int i = 0; i <= ns - 1; ++i) {
    pos[i] = -1000000007;
    int k = 0, j = i;
    while (j < ns) {
      if (s[j] == p[k]) {
        k++;
        if (k == np) {
          pos[i] = j;
          break;
        }
      }
      j++;
    }
  }
  memset(dp, -1, sizeof(dp));
  for (int i = 0; i <= ns; ++i) cout << max(0, f(0, i)) << " ";
  return 0;
}
