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 <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
string s, p;
int get_last_idx(int idx) {
  int now = idx;
  for (int i = p.size() - 1; i >= 0; i--) {
    while (now >= 0 && s[now] != p[i]) now--;
    if (now == -1) return -1;
    if (i == 0) {
      return now;
    }
    now--;
  }
}
const int inf = 1000;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s >> p;
  vector<int> last(s.size(), -1);
  for (int i = p.size() - 1; i < s.size(); i++) {
    int last_idx = get_last_idx(i);
    last[i] = last_idx;
  }
  for (int i = 0; i < s.size(); i++) {
    42;
  }
  vector<vector<int> > dp(s.size() + 1, vector<int>(s.size() + 1, -inf));
  dp[0][0] = 0;
  for (int i = 1; i <= s.size(); i++) {
    for (int j = 0; j <= i; j++) {
      dp[i][j] = 0;
      dp[i][j] = dp[i - 1][j];
      if (j - 1 >= 0) dp[i][j] = max(dp[i - 1][j - 1], dp[i][j]);
      int s_idx = i - 1;
      int last_idx = last[s_idx];
      if (last_idx != -1) {
        int del_num = i - last_idx - p.size();
        if (del_num <= j) {
          dp[i][j] = max(dp[i][j], dp[last_idx][j - del_num] + 1);
        }
      }
    }
  }
  for (int i = 0; i <= s.size(); i++) {
    cout << dp[s.size()][i] << " ";
  }
  cout << endl;
  return 0;
}
