Aureole the Techno-cultural fest of JEC thought of conducting a workshop on big data, as the topic is hot everyone wants to take part but due to limited seats in the Jashan Auditorium there is a selection criteria, a problem is given.
the problem states a string is to be compressed when two or more consecutive characters are same they are to be compressed into one character and the original number count is to be written after it ex. aaabb -> a3b2
where every character is of 8bits and every integer is of 32bits
you are asked to find the difference in size between original string and compressed string

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input $S$ the string to be compressed. 

-----Output:-----
For each testcase, output in a single line The difference in size.

-----Constraints-----
- $1 \leq T \leq 100$
- $1 \leq |S| \leq 10^5$

-----Subtasks-----
- 40 points : S will contain only a-z
- 60 points : S will contain 0-9 characters also

-----Sample Input:-----
1
aaabb

-----Sample Output:-----
-40

-----EXPLANATION:-----
the resulting string will be a3b2 its size will be 80, original string size will be 40 so ans= 40-80

```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 = "def fac(a):\r\n    s=1\r\n    for i in range(1,a+1):\r\n        s=s*i\r\n    return s\r\n\r\ndef prime(n):\r\n    n=int(n)\r\n    if(n==2 or n==3):\r\n        return 1\r\n    k=n**(1/2)\r\n    for i in range(2,int(k)+2):\r\n        if(n%i==0):\r\n            return 0\r\n    return 1\r\n\r\n\r\ndef sieve(n):\r\n    arr=[]\r\n    prime = [True for i in range(n+1)]\r\n    p = 2\r\n    while (p * p <= n):\r\n        if (prime[p] == True):\r\n            for i in range(p * 2, n+1, p):\r\n                prime[i] = False\r\n        p += 1\r\n    for p in range(2, n):\r\n        if prime[p]:\r\n            arr.append(p)\r\n    return arr\r\n\r\n\r\n\r\n\r\nt=int(input())\r\n# n,m=[int(x) for x in input().split()]\r\n\r\nfor ii in range(t):\r\n    s=input()\r\n    prev=s[0]\r\n    ss=[]\r\n    c=1\r\n    for i in s[1:]:\r\n        if(i!=prev):\r\n            if(c==1):\r\n                ss.append('p'+prev)\r\n            else:\r\n                ss.append('p'+prev)\r\n                ss.append(str(c))\r\n            prev=i\r\n            c=1\r\n        else:\r\n            c+=1\r\n\r\n    if(c==1):\r\n        ss.append('p'+prev)\r\n    else:\r\n        ss.append('p'+prev)\r\n        ss.append(str(c))\r\n    hah='0987654321'\r\n    s1=0\r\n    s2=0\r\n\r\n\r\n    s1=8*(len(s))\r\n    for i in ss:\r\n        if (i[0] in hah):\r\n            s2 += 32\r\n        else:\r\n            s2 += 8\r\n    # print(s,ss)\r\n    print(s1-s2)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13837