10150: SPOJ NAJPF - Pattern Find
[Creator : ]
Description
Your task is so simple given a string and a pattern. You find the pattern on the given string. If found print how many time found the pattern and their index. Otherwise print ‘Not Found’
Input
The input line consists of a number $T\ (1 ≤ T ≤ 50)$ test cases.
For each case given two string number $A,B$. the string and the pattern $1 ≤|A|, |B| ≤10^6$.
All character will be lower case Latin character. And $|A|$ is the length of string.
For each case given two string number $A,B$. the string and the pattern $1 ≤|A|, |B| ≤10^6$.
All character will be lower case Latin character. And $|A|$ is the length of string.
Output
For each case print the number (found pattern from the given string) next line there position And Otherwise print 'Not Found' without quota.
There will a blank line between two cases.
There will a blank line between two cases.
Sample 1 Input
3
ababab ab
aaaaa bbb
aafafaasf aaf
Sample 1 Output
3
1 3 5
Not Found
1
1
Here all index is 1 base.