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;

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
typedef vector<int>vint;
typedef pair<int,int>pint;

typedef unsigned long long ull;
const ull p=1000000007;
const int SIZE=1000000;
ull H[SIZE+1],power[SIZE+1];
char S[SIZE+1],T[SIZE+1];

signed main(){
    scanf("%s%s",S,T);
    int ls=strlen(S),lt=strlen(T);
    power[0]=1;
    for(int i=1;i<=ls;i++){
        power[i]=power[i-1]*p;
        H[i]=H[i-1]*p+S[i-1];
    }

    ull ht=0;
    rep(i,lt)ht=ht*p+T[i];

    for(int i=lt;i<=ls;i++){
        ull hs=H[i]-H[i-lt]*power[lt];
        if(hs==ht)printf("%d\n",i-lt);
    }
    return 0;
}