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>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 1000000000000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int N;
string T,P;
int z_algorithm[1010005];

void calc_Z(){

	P = P+'@'+T;

	int P_length = P.length();

	z_algorithm[0] = P_length;
	int index = 1,diff = 0,diff_2;

	while(index < P_length){
		while(index+diff < P_length && P[index+diff] == P[diff])diff++;
		z_algorithm[index] = diff;

		if(diff == 0){
			index++;
			continue;
		}else{

			diff_2 = 1;

			while(index+diff_2 < P_length && z_algorithm[diff_2] < diff-diff_2){

				z_algorithm[index+diff_2] = z_algorithm[diff_2];
				diff_2++;
			}

			index += diff_2;
			diff -= diff_2;
		}
	}
}

int main(){

	cin >> T >> P;

	int len = P.length();

	calc_Z();

	for(int i = len+1; i < P.length(); i++){

		if(z_algorithm[i] == len){

			printf("%d\n",i-(len+1));
		}
	}

	return 0;
}

