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 MAX_S 1000001
#define MAX_T 10001
typedef unsigned long long ull;
const ull B = 1000000007ULL;

vector<ull> p;

vector<ull> rollingHash(char *s,int N){
    vector<ull> hash(N+1);
    hash[0] = 0;
    for(int i = 0 ; i < N ; i++){
        hash[i+1] = hash[i]*B + s[i];
    }
    return hash;
}

int main(){
    char S[MAX_S],T[MAX_T];
    scanf("%s %s",S, T);
    int N = strlen(S);
    int M = strlen(T);
    p.resize(N+1);
    p[0] = 1;
    for(int i = 0 ; i < N ; i++){
        p[i+1] = p[i]*B;
    }
    if(N < M) return 0;
    vector<ull> h = rollingHash(S,N);
    vector<ull> h2 = rollingHash(T,M);
    for(int i = 0 ; i < N ; i++){
        if(i+M > N) continue;
        int L = i, R = i+M-1;
        if(h[R+1]-h[L]*p[R-L+1] == h2[M]){
            printf("%d\n",i);
        }
    }
    return 0;
}