Niebieskie ksi.eczki
II Olympiad in Informatics 1994/1995

Task: SLO
Author: Wojciech Rytter
The Concatenation of Words

III stage contest  

We are given a word w being a pattern and a finite sequence of nonempty words C = (w1, ..., wk). In the sequence C one should indicate words which form the pattern when concatenated in the same order as they appear in the sequence C. The answer is an increasing sequence of numbers of words of the given sequence C, which form the pattern after concatenation. The pattern w and each word in the sequence C consist of at most 150 small letters of English alphabet from 'a' to 'z' and contain no diacritics. The number of words in the sequence is positive and not greater then 200.

Example

The pattern rytter can be formed from the words of the sequence C = (ry, r, yt, y, tt, t, e, te, r, er) choosing successively and concatenating the words numbered (2, 4, 5, 7, 9). The choice (1, 5, 10) is another way to obtain the same pattern.

Task

Write a program that:

Input

Output

In the file SLO.OUT one should write:

Example

For the file SLO.IN:
rytter
10
ry
r
yt
y
tt
t
e
te
r
er
the file SLO.OUT may contain:
9
2
4
5
7
9

Your program should look for the file SLO.IN in the current directory and create the file SLO.OUT also in the current directory. The source file containing the program written by you should be named SLO.???, where ??? are substituted by at most three-letter abbreviation of the programming language used. The same program in an executable form should be written in a file SLO.EXE.