Let's define a function $f(x)$ ($x$ is a positive integer) as follows: write all digits of the decimal representation of $x$ backwards, then get rid of the leading zeroes. For example, $f(321) = 123$, $f(120) = 21$, $f(1000000) = 1$, $f(111) = 111$.

Let's define another function $g(x) = \dfrac{x}{f(f(x))}$ ($x$ is a positive integer as well).

Your task is the following: for the given positive integer $n$, calculate the number of different values of $g(x)$ among all numbers $x$ such that $1 \le x \le n$.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 100$) — the number of test cases.

Each test case consists of one line containing one integer $n$ ($1 \le n < 10^{100}$). This integer is given without leading zeroes.


-----Output-----

For each test case, print one integer — the number of different values of the function $g(x)$, if $x$ can be any integer from $[1, n]$.


-----Examples-----

Input
5
4
37
998244353
1000000007
12345678901337426966631415
Output
1
2
9
10
26


-----Note-----

Explanations for the two first test cases of the example:

if $n = 4$, then for every integer $x$ such that $1 \le x \le n$, $\dfrac{x}{f(f(x))} = 1$;

if $n = 37$, then for some integers $x$ such that $1 \le x \le n$, $\dfrac{x}{f(f(x))} = 1$ (for example, if $x = 23$, $f(f(x)) = 23$,$\dfrac{x}{f(f(x))} = 1$); and for other values of $x$, $\dfrac{x}{f(f(x))} = 10$ (for example, if $x = 30$, $f(f(x)) = 3$, $\dfrac{x}{f(f(x))} = 10$). So, there are two different values of $g(x)$.

Difficulty: EASY

Solutions:
MOD = 1000000007

def si():
	return input()

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())

def out(v):
	print(v)

def d2b(n):
	return bin(n).replace('0b', '')

def twod(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def vow():
	return ['a', 'e', 'i', 'o', 'u']

def let():
	return [chr(i) for i in range(97, 123)]

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def ispow2(x):
	return x and (not x & x - 1)

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)
import math
t = ii()
while t:
	t -= 1
	a = si()
	print(len(a))


for _ in range(int(input())):
	n = input()
	res = 0
	n = int(n)
	while n > 0:
		n = n // 10
		res += 1
	print(res)


import os
import sys
from io import BytesIO, IOBase
import math
from collections import defaultdict
import random
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	print(len(input()))


testcases = int(input())
for testcase in range(testcases):
	n = input()
	print(len(n))


t = int(input())
for l in range(t):
	stm = input()
	print(len(stm))


t = int(input())
for i in range(t):
	n = str(input())
	print(len(n))


t = int(input())
while t:
	print(len(input()))
	t -= 1


for i in range(int(input())):
	A = input()
	print(len(A))


import sys
import math
from heapq import heappop, heappush, heapify

def mati(n):
	return [intl() for i in range(n)]
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : sys.stdout.flush()
for _ in range(iinp()):
	n = inp()
	print(len(n))


n = int(input())
for i in range(n):
	num = input()
	p = len(num) - 1
	while not num[p]:
		p -= 1
	print(p + 1)


num = int(input())
for i in range(num):
	numz = input()
	print(len(numz))


for _ in range(int(input())):
	N = int(input())
	Str = str(N)
	Len = len(Str)
	print(Len)


import sys
input = sys.stdin.readline
n = int(input())
for i in range(n):
	num = input()
	print(len(num) - 1)


for _ in ' ' * int(input()):
	print(len(input()))


import sys
input = sys.stdin.readline

def solve():
	return len(input().strip())
for _ in range(int(input())):
	print(solve())


t = int(input())
while t > 0:
	t -= 1
	s = input()
	l = len(s)
	print(l)


for _ in range(0, int(input())):
	n = int(input())
	s = str(n)
	print(len(s))


t = int(input())
for _ in range(t):
	print(len(input()))


for z in range(int(input())):
	n = input().strip()
	print(len(n))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = input()
		yield len(n)
t = int(input())
ans = gift()
print(*ans, sep='\n')


def solve():
	n = input()
	return len(n)
t = int(input())
ans = []
while t:
	ans.append(str(solve()))
	t -= 1
print('\n'.join(ans))


t = 1
t = int(input())
for _ in range(t):
	n = input()
	print(len(n))


t = int(input())

def main():
	sr = 10
	k = 0
	n = int(input())
	while True:
		if n < sr:
			print(k + 1)
			break
		k += 1
		sr *= 10
while t > 0:
	t -= 1
	main()


t = int(input())
for _ in range(t):
	s = input()
	c = 0
	r = s[::-1]
	for i in r:
		if i == 0:
			c += 1
		else:
			break
	print(len(s) - c)


t = int(input())
for _ in range(t):
	v = int(input())
	print(len(str(v)))


t = int(input())
for T in range(t):
	n = input()
	print(len(n))


q = int(input())
for i in range(q):
	n = input()
	print(len(n))


for _ in range(int(input())):
	a = input()
	print(len(a))


for s in [*open(0)][1:]:
	print(len(s) - 1)


def read():
	return [int(x) for x in input().split()]
(ca,) = read()
for _ in range(ca):
	print(len(input()))


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = ri()
	for _ in range(tc):
		n = rs()
		print(len(n))
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


class Solution:

	def solve(self, n):
		count = 0
		while n != 0:
			n //= 10
			count += 1
		print(count)
sol = Solution()
tests = int(input())
for i in range(tests):
	n = int(input())
	sol.solve(n)


(z, zz) = (input, lambda : list(map(int, z().split())))
fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = 1
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(num):
	print(len(z()))


a = int(input())
for x in range(a):
	b = int(input())
	j = str(b)
	print(len(j))


def answer(s):
	return len(s)
for T in range(int(input())):
	print(answer(input()))


t = int(input())
for T in range(t):
	n = int(input())
	o = 1
	for i in range(0, 10000):
		if o > n:
			print(i)
			break
		o = o * 10


t = int(input())
for i in range(t):
	lst = list(map(int, input().strip()))
	print(len(lst))


t = int(input())
for i in range(t):
	n = int(input())
	k = 0
	while n > 0:
		n = n // 10
		k += 1
	print(k)


s = ''
for _ in range(int(input())):
	s += str(len(input())) + '\n'
print(s[:-1])


for _ in range(int(input())):
	print(len(str(input())))


def main(xs):
	return 0
t = int(input())
for _ in range(t):
	n = input()
	print(len(n))

def test1():
	assert True == False

def test2():
	assert True == False

def test_min():
	assert True == False

def test_max():
	assert True == False


inn = lambda : int(input())
inm = lambda : map(int, input().split())
ins = lambda : str(input())
ina = lambda : list(map(int, input().split()))

def solve():
	s = ins()
	print(len(s))

def main():
	t = 1
	t = int(input())
	for _ in range(t):
		solve()
main()


t = int(input())
l = []
for i in range(t):
	n = int(input())
	l.append(str(n))
for j in l:
	print(len(j))


def main():
	n = int(input())
	c = 0
	while n > 0:
		c += 1
		n //= 10
	print(c)
for _ in range(int(input())):
	main()


for j in range(0, int(input())):
	s = input()
	print(len(s))


n = int(input())
for i in range(n):
	aux = input()
	print(len(aux))


fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from re import *
from sys import *
from math import *
from heapq import *
from queue import *
from bisect import *
from string import *
from itertools import *
from collections import *
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from collections import Counter as cc
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def output(answer):
	stdout.write(str(answer))
num = int(z())
for _ in range(num):
	print(len(fast()))


t = int(input())
op = []
for i in range(t):
	ct = 0
	n = int(input())
	while n > 0:
		n = n // 10
		ct = ct + 1
	op.append(ct)
for i in op:
	print(i)


t = int(input())
for m in range(t):
	n = input()
	print(len(n))


try:
	for _ in range(int(input())):
		n = int(input())
		count = len(str(n))
		print(count)
except:
	pass


n = int(input())
while n > 0:
	n -= 1
	x = input()
	print(len(x))


arr = []
for x in range(int(input())):
	line = input()
	arr.append(len(line))
for x in arr:
	print(x)


test = int(input())
while test > 0:
	test -= 1
	n = int(input())
	rs = 0
	while n > 0:
		n //= 10
		rs += 1
	print(rs)


from functools import reduce
import collections
import math
import sys

class Read:

	@staticmethod
	def string():
		return input()

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def list(delimiter=' '):
		return input().split(delimiter)

	@staticmethod
	def list_int(delimiter=' '):
		return list(map(int, input().split(delimiter)))

def main():
	t = Read.int()
	for _ in range(t):
		a = Read.string()
		print(len(a))
main()


t = int(input())
for i in range(0, t):
	n = input()
	print(len(n))


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
from itertools import permutations, combinations

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from decimal import Decimal
sys.setrecursionlimit(100000)
INF = float('inf')
mod = 10 ** 9 + 7
for t in range(int(data())):
	out(len(data()))


n = int(input())
for j in range(n):
	print(len(input()))


t = int(input())
for _ in range(0, t):
	n = str(input())
	print(len(n))


for i in [0] * int(input()):
	print(len(input()))


testCase = int(input())
for t in range(testCase):
	x = input()
	y = int(x)
	print(len(str(y)))


from sys import stdin
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	n = input()
	print(len(n))


from sys import stdout, stdin, maxsize
from collections import defaultdict, deque
import math
t = int(stdin.readline())
for _ in range(t):
	s = input()
	print(len(s))


n = int(input())
for i in range(n):
	x = int(input())
	y = 1
	cont = 0
	while y <= x:
		y *= 10
		cont += 1
	print(cont)


test = int(input())
for t in range(test):
	print(len(input()))


output = []
for x in range(int(input())):
	output.append(len(input()))
for x in output:
	print(x)


for sulli in [*open(0)][1:]:
	print(len(sulli) - 1)


t = int(input())
while t > 0:
	n = int(input())
	a = 0
	while n > 0:
		n = n // 10
		a = a + 1
	print(a)
	t = t - 1


for _ in range(int(input())):
	s = input()
	print(len(s))


testes = int(input())
for i in range(testes):
	entrada = int(input())
	print(len(str(entrada)))


t = int(input())
for s in range(t):
	n = input()
	print(len(n))


a = int(input())
for i in range(a):
	b = input()
	c = ''
	for i in b[::-1]:
		if i != 0:
			c += i
		else:
			break
	print(len(c))


def ii():
	return int(input())

def li():
	return [int(i) for i in input().split()]
for t in range(ii()):
	n = input()
	print(len(n))


t = int(input())
for cas in range(t):
	res = 0
	print(len(input()))


t = int(input())
for i in range(0, t):
	s = str(input())
	l = len(s)
	print(l)


from sys import stdin
from collections import defaultdict

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	n = input()
	print(len(n))