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>
void pr(const string& name, T t) {
  cerr << name << ": " << t << endl;
}
template <typename T, typename... Types>
void pr(const string& names, T t, Types... rest) {
  auto comma_pos = names.find(',');
  cerr << names.substr(0, comma_pos) << ": " << t << ", ";
  auto next_name_pos = names.find_first_not_of(" \t\n", comma_pos + 1);
  pr(string(names, next_name_pos), rest...);
}
template <class T, class U>
ostream& operator<<(ostream& o, const pair<T, U>& v) {
  return o << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "{";
  for (int i = 0; i < (int)((int)((v).size())); ++i)
    o << (i ? ", " : "") << v[i];
  return o << "}";
}
int ans[2100];
int ne[2100];
int dp[2100][2100];
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s, p;
  cin >> s >> p;
  memset(ne, -1, sizeof(ne));
  for (int i = 0; i < (int)((s).size()); ++i) {
    if (s[i] != p[0]) continue;
    int j = 1;
    int ti = i + 1;
    for (; j < (int)((p).size()); ++j) {
      while (ti < (int)((s).size()) && s[ti] != p[j]) ++ti;
      if (ti == (int)((s).size())) break;
      ++ti;
    }
    if (j == (int)((p).size())) ne[i] = ti;
  }
  for (int i = 0; i < (int)((int)((s).size()) + 1); ++i)
    for (int j = 0; j < (int)((int)((s).size()) + 1); ++j) dp[i][j] = 1 << 28;
  dp[0][0] = 0;
  for (int i = 0; i < (int)((s).size()); ++i) {
    for (int j = 0; j <= (int)((s).size()); ++j) {
      if (ne[i] != -1)
        dp[ne[i]][j + 1] =
            min(dp[ne[i]][j + 1], dp[i][j] + ne[i] - i - (int)((p).size()));
      dp[i + 1][j] = min(dp[i + 1][j], dp[i][j]);
    }
  }
  for (int i = 0; i <= (int)((s).size()); ++i) {
    int c = dp[(int)((s).size())][i];
    if (c == (1 << 28)) continue;
    for (int j = c; j + i * (int)((p).size()) <= (int)((s).size()); ++j)
      ans[j] = max(ans[j], i);
  }
  for (int i = 0; i < (int)((int)((s).size()) + 1); ++i) {
    if (i) cout << ' ';
    cout << ans[i];
  }
  cout << '\n';
}
