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 INF 1LL<<30
#define MAXN 1000002
#define pb push_back
#define optimizar_io ios_base::sync_with_stdio(0);cin.tie(0);
#define fst first
#define snd second
#define B 127
#define endl '\n'
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
string T;
string P;
int b[MAXN];
int n,m;
void kmpPreprocess(){
    int i = 0, j = -1;
    b[0] = -1;
    while(i < m){
        while(j >= 0 && P[i] != P[j]) j = b[j];
        i++,j++;
        b[i] = j;
    }
}
void kmpSearch(){
    int i = 0,j = 0;
    while(i < n){
        while(j>=0 && T[i] != P[j]) j = b[j];
        i++,j++;
        if(j == m){
            cout << i - j << endl;
        }
    }
}
int main(){
    optimizar_io;
    cin >> T;
    cin >> P;
    n = T.size();
    m = P.size();
    kmpPreprocess();
    kmpSearch();



    return 0;

}

