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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long power(long long a, long long n) {
  a %= 1000000007;
  if (n == 1) return a;
  if (n == 0) return 1;
  if (n % 2)
    return (a * (power((a * a) % 1000000007, n / 2) % 1000000007)) % 1000000007;
  return power((a * a) % 1000000007, n / 2) % 1000000007;
}
const long long inf = (long long)1e18;
long long inverse(long long x) { return power(x, 1000000007 - 2) % 1000000007; }
long long nxt[2005][30], dp1[2005], dp2[2005][2005];
void solve() {
  string s, p;
  cin >> s >> p;
  long long n = (long long)s.size(), m = (long long)p.size();
  s = '#' + s;
  p = '#' + p;
  for (long long i = 0; i < 26; ++i) nxt[n + 1][i] = n + 1;
  for (long long i = n; i > 0; --i) {
    for (long long j = 0; j < 26; ++j) nxt[i][j] = nxt[i + 1][j];
    nxt[i][s[i] - 'a'] = i;
  }
  for (long long i = 1; i < n + 1; ++i) {
    long long cp = i;
    for (long long j = 1; j < m + 1; ++j) {
      if (nxt[cp][p[j] - 'a'] > n) {
        dp1[i] = inf;
        break;
      }
      dp1[i] += nxt[cp][p[j] - 'a'] - cp;
      cp = nxt[cp][p[j] - 'a'] + 1;
    }
  }
  memset(dp2, -1, sizeof dp2);
  dp2[n + 1][0] = 0;
  for (long long i = n; i > 0; --i) {
    for (long long j = 0; j < n + 1; ++j) {
      if (dp1[i] <= j && dp2[i + m + dp1[i]][j - dp1[i]] != -1)
        dp2[i][j] = 1 + dp2[i + m + dp1[i]][j - dp1[i]];
      if (j > 0) dp2[i][j] = max(dp2[i][j], dp2[i + 1][j - 1]);
      dp2[i][j] = max(dp2[i][j], dp2[i + 1][j]);
    }
  }
  for (long long i = 0; i < n + 1; ++i) cout << dp2[1][i] << " ";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long T = 1;
  for (long long t = 1; t < T + 1; ++t) {
    solve();
  }
  return 0;
}
