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
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 2 ** 61 - 1
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    T = SI()
    P = SI()

    lenP = len(P)
    lenT = len(T)
    h1 = 0
    base = ord('0') - 1
    for a in P:
        h1 = (h1 * 76 + ord(a) - base) % MOD

    h2 = 0
    for a in T[:lenP]:
        h2 = (h2 * 76 + ord(a) - base ) % MOD

    for i in range(lenT - lenP + 1):
        if h1 == h2: print(i)
        if i < lenT - lenP:
            h2 = (h2 * 76 + ord(T[i+lenP])-base - (ord(T[i])-base) * pow(76,lenP,MOD)) % MOD

if __name__ == '__main__':
    main()
