Medium Accuracy: 35.08% Submissions: 2670 Points: 4
Given two strings, one is a text string and other is a pattern string. The task is to print the indexes of all the occurences of pattern string in the text string. For printing, Starting Index of a string should be taken as 1.
Note: Strings contain only lower case alphabets.
First line of the input contains an integer 'T' denoting the total number of test cases. Then T test cases follow. Each test consists of two lines. First line of each test case contains the text string. Second line of each test case contains the pattern string.
Print indexes all the occurences of the pattern strings in the text string in a single line seprated by spaces.
Print -1 if no pattern found.
1 <= T <= 100
1 <= Sizeof of text String <= 10000
1 <= Sizeof pattern String <= Sizeof text String