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<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<queue>
using namespace std;
long long int inf = 10000000000;

int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};

vector<long long int> rollinghash(string s, int a){
  int n = s.size();
  vector<long long int> rh(n+1, 0);
  for(int i=0; i<n; i++){
    rh[i+1] = rh[i] * a + s[i];
  }
  return rh;
}

int main(){
  string s, t;
  cin >> s >> t;
  int n = s.size();
  int m = t.size();
  vector<long long int> p(n+1, 0);
  p[0] = 1;
  long long int a = 1000000007;
  for(int i=0; i<n; i++){
    p[i+1] = p[i] * a;
  }

  vector<long long int> rhs = rollinghash(s, a);
  vector<long long int> rht = rollinghash(t, a);

  for(int i=0; i<n; i++){
    int l = i; int r = i + m - 1;
    if( rhs[r+1] - rhs[l] * p[r-l+1] == rht[m] ) cout << i << endl;
  }

  return 0;
}





// EOF