You are given two strings: S and Q. Find the length of the longest prefix of Q, which appears in S as a substring. Input data specification First string of the file contains number of test cases T. Then for each of T cases there're two lines. First line contains string S and second line contains string Q. Output data specification For each test case produce one line of output with a single number: the length of the longest prefix of Q, which appears in S as a substring. Constrains: 1 <= Lenght of S <= 300000 1 <= Length of Q <= Length of S Both string consist only of lowercase english letters and digits Sample input: 2 vabcabdadcabc abcd sample2 sample3 Sample output: 3 6