#include <iostream>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
typedef unsigned long long lli;
typedef unsigned long long ull;
typedef vector<lli> vll;
typedef vector<bool> vbl;
typedef vector<vector<lli> > mat;
typedef vector<vector<bool> > matb;
typedef vector<string> vst;
typedef pair<lli,lli> pll;
typedef pair<double,double> pdd;

string t;
string p;

const ull b = 1000000007;
ull hsh = 0;
ull cmp = 0;
vll vb;

int main(){
    cin >> t >> p;
    if(t.size() < p.size()) return 0;
    vb = vll(p.size());
    vb[0] = 1;
    for(lli i = 1;i < p.size();i++){
        vb[i] = vb[i-1]*b;
    }
    for(lli i = 0;i < p.size();i++){
        hsh += ((lli)p[i])*vb[p.size()-i-1];
        cmp += ((lli)t[i])*vb[p.size()-i-1];
    }
    for(lli i = 0;i < t.size()-p.size();i++){
        if(hsh == cmp) cout << i << endl;
        cmp -= vb.back()*t[i];
        cmp *= b;
        cmp += t[i+p.size()];
    }
    if(cmp == hsh) cout << t.size()-p.size() << endl;
    return 0;


}
### Prompt

Please provide a cpp coded solution to the problem described below:

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

### Response

```cpp
#include <iostream>
#include <list>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
typedef unsigned long long lli;
typedef unsigned long long ull;
typedef vector<lli> vll;
typedef vector<bool> vbl;
typedef vector<vector<lli> > mat;
typedef vector<vector<bool> > matb;
typedef vector<string> vst;
typedef pair<lli,lli> pll;
typedef pair<double,double> pdd;

string t;
string p;

const ull b = 1000000007;
ull hsh = 0;
ull cmp = 0;
vll vb;

int main(){
    cin >> t >> p;
    if(t.size() < p.size()) return 0;
    vb = vll(p.size());
    vb[0] = 1;
    for(lli i = 1;i < p.size();i++){
        vb[i] = vb[i-1]*b;
    }
    for(lli i = 0;i < p.size();i++){
        hsh += ((lli)p[i])*vb[p.size()-i-1];
        cmp += ((lli)t[i])*vb[p.size()-i-1];
    }
    for(lli i = 0;i < t.size()-p.size();i++){
        if(hsh == cmp) cout << i << endl;
        cmp -= vb.back()*t[i];
        cmp *= b;
        cmp += t[i+p.size()];
    }
    if(cmp == hsh) cout << t.size()-p.size() << endl;
    return 0;


}
```