Sanchit, the famous coder of CSI-NSIT, recently got an internship. Since he is quite free nowadays, he can help anyone with their coding assignments. He decides to help his girlfriend first with her coding assignment. Help him out in helping her.
You are given two strings A and B. You have to convert string A to string B.
You can perform 2 operations on any of the characters.
(1) change that character to the next character i.e. A to B, B to C,...... Y to Z, Z to A
(2) change that character with the 13th next character (including wrap-around) i.e. A to N, B to O,..... M to Z, N to A, O to B, P to C... and so on.
Your task is to find the minimum number of operations required to convert A to B.
Input Format:
The first line of input is T, number of test cases.
Next T lines contain two space-separated strings A and B.
Output Format:
For each test case, output a single integer denoting the minimum number of operations to convert A to B in a new line.
Constraints:
\(1<=T<=10\)
\(1<=|A|,|B|<=10^5 \)
\(|A|=|B|
\)
\(|str|\) means length of string
A->P: A->N->O->P 3 operations
B->B: 0 operation
C->D: C->D 1 operation
T->I: T->G->H->I 3 operations
So total 7 operations required.