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 T, class U>
void ckmin(T &a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
void ckmax(T &a, U b) {
  if (a < b) a = b;
}
int N, M, A;
vector<int> s, t;
vector<vector<pair<int, int> > > dp[2013];
int aut[513][30];
int ans[2013];
vector<int> stov(string str) {
  vector<int> res(((int)(str).size()));
  for (auto i = (0); i < (((int)(str).size())); i++) res[i] = str[i] - 'a' + 1;
  return res;
}
void kmp() {
  vector<int> lps(M);
  lps[0] = 0;
  for (auto i = (1); i < (M); i++) {
    int j = lps[i - 1];
    while (j && t[j] != t[i]) j = lps[j - 1];
    lps[i] = j + (t[j] == t[i]);
  }
  for (auto i = (0); i < (M); i++) {
    if (i) {
      for (auto j = (0); j < (30); j++) {
        aut[i][j] = aut[lps[i - 1]][j];
      }
    }
    aut[i][t[i]] = i + 1;
  }
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string temps;
  cin >> temps;
  N = ((int)(temps).size());
  s = stov(temps);
  cin >> temps;
  M = ((int)(temps).size());
  t = stov(temps);
  kmp();
  A = N / M + 1;
  for (auto i = (0); i < (N + 1); i++) {
    dp[i].resize(M + 1);
    for (auto j = (0); j < (M + 1); j++) {
      dp[i][j].resize(A + 1);
      for (auto k = (0); k < (A + 1); k++) {
        dp[i][j][k] = {1000000007, -1000000007};
      }
    }
  }
  dp[0][0][0] = {0, 0};
  for (auto i = (0); i < (N); i++) {
    for (auto j = (0); j < (M); j++) {
      for (auto k = (0); k < (A + 1); k++) {
        pair<int, int> p = dp[i][j][k];
        if (p.first >= 1000000007) continue;
        ckmin(dp[i + 1][j][k].first, p.first + 1);
        ckmax(dp[i + 1][j][k].second, p.second + 1);
        int to = aut[j][s[i]];
        if (to == M) {
          ckmin(dp[i + 1][0][k + 1].first, p.first);
          ckmax(dp[i + 1][0][k + 1].second, p.second);
        } else {
          ckmin(dp[i + 1][to][k].first, p.first);
          ckmax(dp[i + 1][to][k].second, p.second);
        }
      }
    }
  }
  for (auto i = (0); i < (N + 1); i++) {
    for (auto j = (0); j < (M); j++) {
      for (auto k = (0); k < (A + 1); k++) {
        pair<int, int> p = dp[N][j][k];
        if (p.first <= i && i <= p.second) ckmax(ans[i], k);
      }
    }
  }
  for (auto i = (0); i < (N + 1); i++) {
    if (i) cout << ' ';
    cout << ans[i];
  }
  cout << '\n';
  return 0;
}
