EIU ACM Preparation

Start

2018-05-31 09:30 UTC

EIU ACM Preparation

End

2018-06-01 15:30 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -410 days 20:23:34

30:00:00

0:00:00

Problem DString Matching

Input

The input consists of several test cases. Each test case consists of two lines, first a non-empty pattern, then a non-empty text. Input is terminated by end-of-file. The input file will not be larger than 5 Mb.

Output

For each test case, output one line containing the positions of all the occurences of pattern in text, from first to last, separated by a single space.

Sample Input 1 Sample Output 1
p
Popup
helo
Hello there!
peek a boo
you speek a bootiful language
anas
bananananaspaj

2 4

5
7