Find places where a string P is found within a text T. Print all indices of T where P found. The indices of T start with 0.

Constraints

* 1 ≤ length of T ≤ 1000000
* 1 ≤ length of P ≤ 10000
* The input consists of alphabetical characters and digits

Input

In the first line, a text T is given. In the second line, a string P is given.

Output

Print an index of T where P found in a line. Print the indices in ascending order.

Examples

Input

aabaaa
aa


Output

0
3
4


Input

xyzz
yz


Output

1


Input

abc
xyz


Output
/*
 * aoj/alds1_14_a/main.cpp
 */

// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> ostream & operator << (ostream & out, vector<T> const & v) {
  for (auto &&a: v) out << a << " "; out << endl; return out;
}
template <class T> void dump(T &a) { cout << a << endl; }
void solve();
int main() { solve(); return 0; }

#define ull unsigned long long

/*
 * 1. 短い方の長さまでのハッシュを取る.
 * 2. 比較する.
 */
const ull b = 100000007;
void solve() {
  string t, s;
  ull tl, sl;
  cin >> t >> s;
  tl = t.size();
  sl = s.size();

  ull th = 0, sh = 0; // オーバーフローを利用した2^64 mod計算
  loop(i,0,sl) th = th * b + t[i];
  loop(i,0,sl) sh = sh * b + s[i];

  ull b_sl = 1;
  loop(i,0,sl) b_sl *= b;

  vector<int> ans;
  for (int i=0; i+sl<=tl; i++) {
    if (th == sh) ans.push_back(i);
    if (i+sl<tl) th = th * b + t[i+sl] - t[i] * b_sl;
  }

  for(auto&&a: ans) cout << a << endl;
}

