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 <iostream>
#include <vector>
#include <queue>
#include<algorithm>
#define rep(i,n) for(int i = 0;i < n;i++)
#define req(i,n) for(int i = 1; i<n;i++)
#define ALL(a) a.begin(),a.end()
#define B1 1000000007
#define B2 100000007
using namespace std;
typedef unsigned long long int ull;
template<typename T, T MOD, T B>
struct RollingHash {
    vector<T> hash, p;
    RollingHash() {}
    RollingHash(const string& s) {
        int n = s.size();
        hash.assign(n + 1, 0);
        p.assign(n + 1, 1);
        for (int i = 0; i < n; i++) {
            hash[i + 1] = (hash[i] * B + s[i]) % MOD;
            p[i + 1] = p[i] * B % MOD;
        }
    }
    //S[l, r)
    T find(int l, int r) {
        T res = hash[r] + MOD - hash[l] * p[r - l] % MOD;
        return res >= MOD ? res - MOD : res;
    }
};
int main() {
    string s, t;cin >> s >> t;
    if(s.size() < t.size()) return 0;
    using RH = RollingHash<ull,B1, B2>;
    RH rs(s), rt(t);
    rep(i, s.size() - t.size()+1) {
        if (rs.find(i, i + t.size()) == rt.find(0, t.size()))cout << i << endl;
    }
}
