Looking for the hidden country in a given sentence. This hidden country is formed by consecutive letters of the sentence, where white space and characters that are not letters of the alphabet are to be ignored. When looking for the country in the sentence, no distinction should be made between uppercase and lowercase letters. On the basis of the country and the sentence in which this country is hidden, you have to reveal at what position in the sentence the country can be found.

Input

The first line of the input contains a number indicating how many country-sentence pairs are to follow. Then you always get two lines with country-sentence pairs: first the country, then the sentence. Each on a separate line. You may assume that the country occurs at least once in the sentence.

Output

You give the position in the sentence where the country can be found. This position is given as an index in the sentence where the first letter of the country is, where counting indices starts from 0.

Example

Input:

2
Mali
Panama lies in Central America.
Poland
The criminal was arrested by Interpol and the local police. 

Output:

4
34