Problem F
String Multimatching
Input
The input consists of at most ten test cases. Each test case
begins with an integer
Output
For each test case, output
Sample Input 1 | Sample Output 1 |
---|---|
2 p pup Popup 2 You peek a boo you speek a bootiful language 4 anas ana an a bananananaspaj |
2 4 2 5 7 1 3 5 7 1 3 5 7 1 3 5 7 9 12 |