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;
const long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T>
inline T abs(T x) {
  return x > T() ? x : -x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 2000;
const int M = 500;
struct Input {
  string s, t;
  bool read() { return getline(cin, s) && getline(cin, t); }
  void init(const Input& input) { *this = input; }
};
struct Data : Input {
  int ans[N + 1];
  void write() {
    for (int i = 0; i < int(((int)(s).size()) + 1); ++i) {
      if (i) {
        printf(" ");
      }
      printf("%d", ans[i]);
    }
    puts("");
  }
  virtual void solve() {}
  virtual void clear() { *this = Data(); }
};
struct Solution : Data {
  int r[N + 1];
  int d[N + 1][N + 1];
  void solve() {
    for (int i = 0; i < int(N + 1); ++i) {
      int j = 0;
      r[i] = i;
      while (r[i] < ((int)(s).size()) && j < ((int)(t).size())) {
        j += (s[r[i]] == t[j]);
        r[i]++;
      }
      if (j != ((int)(t).size())) {
        r[i] = -1;
      }
    }
    for (int i = 0; i < int(N + 1); ++i) {
      for (int j = 0; j < int(N + 1); ++j) {
        d[i][j] = N + 1;
      }
    }
    d[0][0] = 0;
    for (int i = 0; i < int(((int)(s).size())); ++i) {
      for (int j = 0; j < int(((int)(s).size())); ++j) {
        umn(d[i + 1][j], d[i][j]);
        if (r[i] != -1) {
          umn(d[r[i]][j + 1], d[i][j] + r[i] - i - ((int)(t).size()));
        }
      }
    }
    memset(ans, 0, sizeof ans);
    for (int i = 0; i < int(((int)(s).size()) + 1); ++i) {
      for (int j = d[((int)(s).size())][i];
           j <= ((int)(s).size()) - i * ((int)(t).size()); ++j) {
        umx(ans[j], i);
      }
    }
  }
  void clear() { *this = Solution(); }
};
Solution sol;
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  sol.read();
  sol.solve();
  sol.write();
  return 0;
}
