The first line of input contains an integer number T, representing the number of test cases to follow. Each test case consists of 2 lines. The first of these lines contains the string S1 and the second line contains the string S2. Both of these strings contain at least 1 and at most 1.000.000 characters.
For each of the T test cases, in the order given in the input, print one line containing the length of the shortest common superstring.
2
alba
bacau
resita
mures