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>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const double PI = 3.141592653589793238463;
const int INF = 0x3f3f3f3f;
const int INFS = 1000000001;
const long long LLINF = 9223372036854775807;
const long long M = 1000000007;
const double EPS = 1e-8;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, p;
  cin >> s >> p;
  long long n = s.size(), m = p.size();
  vector<long long> to(n), c(n);
  long long p1, p2;
  for (long long i = 0; i < n; i++) {
    to[i] = -1;
    c[i] = -1;
    p1 = i;
    p2 = 0;
    while (p1 < n && p2 < m) {
      if (s[p1] == p[p2]) ++p2;
      ++p1;
    }
    if (p2 == m) {
      to[i] = p1;
      c[i] = (p1 - i) - m;
    }
  }
  vector<vector<long long> > dp(n + 1, vector<long long>(n + 1, 0));
  for (long long j = n - 1; j > -1; j--) {
    dp[0][j] = dp[0][j + 1];
    if (c[j] == 0) dp[0][j] = max(dp[0][j], dp[c[j]][to[j]] + 1);
  }
  cout << dp[0][0] << ' ';
  for (long long i = 1; i < n + 1; i++) {
    for (long long j = n - 1; j > -1; j--) {
      dp[i][j] = max(dp[i][j + 1], dp[i - 1][j + 1]);
      if (c[j] != -1 && c[j] <= i && (c[j] + (n - to[j])) >= i)
        dp[i][j] = max(dp[i][j], dp[i - c[j]][to[j]] + 1);
    }
    cout << dp[i][0] << ' ';
  }
  cout << "\n";
  return 0;
}
