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
//API???????????????
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
	final static int Code = 5;
	
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] A, B;
		//??\?????¨??¨??????char???????????£??\
		A = br.readLine().toCharArray();
		B = br.readLine().toCharArray();

		//A??????????????????????????????
		if(A.length < B.length) return;

		int t = 0;
		int p = 0;
		int BN = search(Code, B.length);

		for(int i = 0; i < B.length; i++){
			t = t * Code + A[i];
			p = p * Code + B[i];
		}

		System.out.print(Print(t ,p, A, B, BN));

		return;
	}

	public static int search(int x, int n){
		if(n == 0) return 1;
		int ret = search(x * x, n / 2);
		//??????????????????AND?????????
		if((n & 1) == 1) ret *= x;
		return ret;
	}

	public static String Print(int t, int p, char[] A, char[] B, int BN){
		StringBuilder sb = new StringBuilder();

		//t??¨p?????????????????????????????¨???
		if(t == p) sb.append("0\r\n");
		for(int i = 1; i < A.length - B.length + 1; i++){
			t = t * Code + A[i + B.length - 1] - A[i - 1] * BN;
			if(t == p) sb.append(i + "\r\n");
		}

		return sb.toString();
	}
}