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
#include <bits/stdc++.h>
using namespace std;

struct RollingHash {
  typedef unsigned long long ull;
  string S;
  ull B;
  int len;
  vector<ull> hash, p;
  RollingHash() {}
  RollingHash(string S_, ull B_ = 1000000007LL):
    S(S_), B(B_), len(S.length()), hash(len+1), p(len+1) {
    hash[0] = 0; p[0] = 1;
    for ( int i = 0; i < len; i++ ) {
      hash[i+1] = hash[i]*B+S[i];
      p[i+1] = p[i]*B;
    }
  }
  //S[l,r)
  ull find(int l, int r){
    return hash[r]-hash[l]*p[r-l];
  }
};

int main() {
  string T, P;
  cin >> T >> P;

  int t = T.size();
  int p = P.size();  
  /*for ( int i = 0; i <= t-p; i++ ) {
    if ( P == T.substr(i, p) ) cout << i << endl;
    }*/

  RollingHash rht(T), rhp(P);  
  for ( int i = 0; i <= t-p; i++ ) {
    if ( rht.find(i, i+p) == rhp.find(0, p) ) cout << i << endl;    
  }
  
  return 0;
}

