You are given a string and a pattern. You find the pattern on the given string. If found print how many times found the pattern and their index. Otherwise, print "Not Found".
The given problem, wants you to find those indices from the first string from where if we find the substring of length equal to the second string then both the substring and second string are equal. If it is not possible to find any of the indices then you are asked to print "Not Found".
Input: The input line consists of a number of T test cases. Each test case has two strings A and B. Here |A|>|B|.
Output: For each case print the number (found pattern from the given string) next line their position. Otherwise, print 'Not Found'. There will a blank line between the two cases.
1 3 5
Since the pattern "ab" occurs at indices 1,3 and 5 so size is 3.