Emily and Mia are friends. Emily got Mia’s essay paper, but since she is a prankster, she decided to meddle with the words present in the paper. She changes all the words in the paper into palindromes. To do this, she follows two rules: 
- In one operation she can only reduce the value of an alphabet by 1, i.e.  she can change ‘d’ to ‘c’, but she cannot change ‘c’ to ‘d’ or ‘d’ to ‘b’. 
- The alphabet ‘a’ will not be reduced any further. 
Each reduction in the value of any alphabet is counted as a single operation. Find the minimum number of operations required to convert a given string into a palindrome.

-----Input:-----
- The first line contains an integer $T$, denoting the number of test cases. 
- Each test case consists of a string $S$ containing only lowercase characters with no spaces.

-----Output:-----
For each test case on a new line, print the minimum number of operations for the corresponding test case.

-----Constraints-----
- $1<=T<=10$
- $1<=|S|<=10^7$, where $|S|$ denotes length of string S.

-----Sample Input:-----
4 
abc 
abcba 
abcd 
cba

-----Sample Output:-----
2 
0
4
2

-----EXPLANATION:-----
For the first test case string = “abc” 
c->b->a so the string become “aba” which is a palindrome. For this we perform 2 operations

```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 = '"""\n _____   _    _   __    __     ____     __    _\n/ ____| | |  | | |  \\  /  |   /    \\   |  \\  | |\n| |___  | |  | | |   \\/   |  /   _  \\  | . \\ | |\n\\____ \\ | |  | | | |\\__/| | |   /_\\  | | |\\ \\| |\n____| | | \\__/ | | |    | | |   __   | | | \\ ` |\n|_____/ \\______/ |_|    |_| |__|  |__| |_|  \\__|\n\n"""\n"""\n/*\nTemplate by Sai Suman Chitturi\nLinkedin: https://www.linkedin.com/in/sai-suman-chitturi-9727a2196/\nHackerrank: https://www.hackerrank.com/skynetasspyder?hr_r=1\nCodechef: https://www.codechef.com/users/suman_18733097\nCodeforces: http://codeforces.com/profile/saisumanchitturi\nGithub: https://github.com/ChitturiSaiSuman\nHackerearth: https://www.hackerearth.com/@chitturi7\nSPOJ: Sai Suman Chitturi @out_of_bound\n*/\n"""\nfrom sys import stdin,stdout,stderr,setrecursionlimit\nfrom math import pi,sqrt,gcd,ceil,floor,log2,log10,factorial\nfrom math import cos,acos,tan,atan,atan2,sin,asin,radians,degrees,hypot\nfrom bisect import insort,insort_left,insort_right,bisect_left,bisect_right,bisect\nfrom functools import reduce\nfrom itertools import combinations,combinations_with_replacement,permutations\nfrom fractions import Fraction\nfrom random import choice,getrandbits,randint,random,randrange,shuffle\nfrom re import compile,findall,escape,search,match\nfrom statistics import mean,median,mode\nfrom heapq import heapify,heappop,heappush,heappushpop,heapreplace,merge,nlargest,nsmallest\nfrom collections import deque,OrderedDict,defaultdict\nfrom collections import Counter,namedtuple,ChainMap,UserDict,UserList,UserString\nfrom numpy import dot,trace,argmax,argmin,array,cumprod,cumsum,matmul\n\nmod = 10**9+7\nhell = 10**9+9\ninf = 10**18\nlcm = lambda x,y: ((x*y)//gcd(x,y))\nadd = lambda x,y: (x%mod+y%mod)%mod\nsub = lambda x,y: ((x%mod-y%mod)+mod)%mod\nmul = lambda x,y: ((x%mod)*(y%mod))%mod\ninverse = lambda x: (pow(x,mod-2,mod))\nsetBitCount = lambda x: bin(x).count("1")\nsumOfDigits = lambda x: sum([int(i) for i in str(x)])\n\nsize = 10**6+1\n\nsetrecursionlimit(size)\n\ndef preCompute():\n    return\n\ndef solve():\n    return\n\ndef main():\n    io = IO()\n    testcases = 0\n    if testcases == 0:\n        testcases = io.nextInt()\n    preCompute()\n\n    for test in range(testcases):\n        # io.write("Case #%d: "%(test+1),end="")\n        s = io.String()\n        n = len(s)\n        ans = 0\n        for i in range(n//2):\n            ans += abs(ord(s[i])-ord(s[n-i-1]))\n        io.write(ans)\n        # solve()\n\n\n\nclass IO:\n    def next(self):\n        return stdin.readline().strip()\n    def nextLine(self):\n        return self.next()\n    def String(self):\n        return self.next()\n    def nextStrings(self):\n        return list(map(str,self.next().split()))\n    def nextInt(self):\n        return int(self.next())\n    def Int(self):\n        return self.nextInt()\n    def nextFloat(self):\n        return float(next())\n    def Float(self):\n        return self.nextFloat()\n    def nextList(self):\n        return list(map(int,self.next().split()))\n    def List(self):\n        return self.nextList()\n    def nextTuple(self):\n        return tuple(map(int,self.next().split()))\n    def Tuple(self):\n        return self.nextTuple()\n    def debug(self,*obj,sep=" ",end="\\n"):\n        string = sep.join([str(item) for item in obj])+end\n        stderr.write(string)\n    def print(self,*obj,sep=" ",end=\'\\n\'):\n        string = sep.join([str(item) for item in obj])+end\n        stdout.write(string)\n    def write(self,*obj,sep=" ",end="\\n"):\n        self.print(*obj,sep=sep,end=end)\n\nmain()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 6176798