Watson gives to Sherlock two strings S1 and S2 consisting of uppercase English alphabets. Next he wants Sherlock to build a flower in the following way:

He puts both strings perpendicular to each other in such a way that they overlap at the same character. For example, if he has two strings "ABCDEF" and "XXBCZQ", one possible way to make a flower is:

Length of petals in the above flower are 2, 2, 3 and 3.
A flower's ugliness is sum of absolute difference of adjacent petal lengths i.e. i.e. if adjacent petal lengths are L1, L2, L3, L4, then ugliness of flower is |L1 - L2| + |L2 - L3| + |L3 - L4| + |L4 - L1|. 
Sherlock wants to find minimum value of ugliness if we consider all possible flower configurations. Note that a configuration is valid even if any of the petal length is 0.

-----Input-----
First line contains T, number of test cases. Each test case consists of string S1 in one line followed by string S2 in the next line. It is guaranteed that there exists at least one possible way to make a flower.

-----Output-----
For each test case, output in one line the required answer.

-----Constraints-----
- 1 ≤ T ≤ 10
- 1 ≤ length(S1), length(S2) ≤ 105

-----Example-----
Input:
2
ABCDE
XXBCZQ
BBB
BBBBBB

Output: 
2
6

-----Explanation-----

Test case 1:

If we keep the configuration shown in statement, the ugliness is 2, which is minimum possible.

Test case 2:

One of the best configurations is

B 
B B B  B  B B
B

where petal lengths are 1, 3, 1, 2.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'for _ in range(eval(input())):\n    S1=input()\n    m1=len(S1)/2\n\n    S2=input()\n    m2=len(S2)/2\n    d1={}\n    d2={}\n    for i in range(len(S1)):\n        c=S1[i]\n        v=abs(m1-i)\n        if c in d1:\n            if v<d1[c][0]:\n                d1[c]=[v,i]\n        else:\n            d1[c]=[v,i]\n    for i in range(len(S2)):\n        c=S2[i]\n        v=abs(m2-i)\n        if c in d2:\n            if v<d2[c][0]:\n                d2[c]=[v,i]\n        else:\n            d2[c]=[v,i]\n\n    mini=999999999999999999999999999999999\n    for i in d1:\n        if i in d2:\n            L1=d1[i][1]\n            L3=len(S1)-L1-1\n            L2=d2[i][1]\n            L4=len(S2)-L2-1\n            v=abs(L1-L2)+abs(L2-L3)+abs(L3-L4)+abs(L4-L1)\n            if v<mini:\n                mini=v\n    print(mini)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 17183