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;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;

ll power_mod(ll x, ll y, ll m){
  ll res = 1;
  if(y>0){
    res = power_mod(x,y/2,m);
    if(y%2==0) res = (res*res)%m;
    else res = (((res*res)%m)*x)%m;
  }
  return res;
}

ll trans(char c){
  return (ll)(c) + 1;
}

// len文字のハッシュ値を返す
vvll rolling_hash1D(string str, ll len){
  ll n = str.size();
  if(n < len) return {}; // 空の配列を返す

  vll mod = {1000000000 + 7, 1000000000 + 9, 1000000000 + 21};
  ll base = 257;

  ll mods = mod.size();

  vvll res(n,vll(mods));

  for(ll m=0;m<mods;m++){
    ll k = power_mod(base,len,mod[m]);

    ll hog = 0;
    for(ll i=0;i<len;i++) hog = ( hog * base % mod[m] + trans(str[i])) % mod[m];

    for(ll i=0;i+len<=n;i++){
      res[i][m] = hog;
      if(i+len < n) hog = (hog * base % mod[m] + trans(str[i+len]) - trans(str[i]) * k + mod[m] * mod[m]) % mod[m];
    }
    
  }

  return res;
}
int main(){
  string s, t;
  cin >> s >> t;

  ll m = t.size();
  vvll hs = rolling_hash1D(s,m);
  vvll ht = rolling_hash1D(t,m);

  if(hs.size() == 0 || ht.size() == 0) return 0;

  for(ll i=0;i<=s.size()-m;i++){
    if(hs[i] == ht[0]) cout << i <<endl;
  }
  return 0;
}
