import java.util.*;
import java.io.*;
import java.math.*;

public class Main
{
    public static long total(long a){
        long temp = a;
        long b = 0;
        do{
            temp = temp / 10;
            b ++;
        }while (temp != 0);

        return b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        long in [] = new long [t];

        for (int i = 0; i < t; i ++){
            in[i] = sc.nextLong();
        }

        for(int i = 0; i < t; i ++){
            long s = total(in[i]);

            System.out.println(s);
        }

    }

}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main
{
    public static int total(int a){
        int temp = a;
        int b = 0;
        do{
            temp = temp / 10;
            b ++;
        }while (temp != 0);

        return b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int in [] = new int [t];

        for (int i = 0; i < t; i ++){
            in[i] = sc.nextInt();
        }

        for(int i = 0; i < t; i ++){
            int s = total(in[i]);

            System.out.println(s);
        }

    }

}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main
{
    public static int total(BigInteger a){
        BigInteger temp = a;
        int b = 0;
        int r = 10;
        do{
        temp = temp.divide(BigInteger.valueOf(r));
        b ++;
        }while (temp != BigInteger.ZERO);

        return b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        BigInteger in [] = new BigInteger [t];

        for (int i = 0; i < t; i ++){
            in[i] = sc.nextBigInteger();
        }

        for(int i = 0; i < t; i ++){
            int s = total(in[i]);

            System.out.println(s);
        }

    }

}


import java.util.*;
import java.io.*;
import java.math.*;

public class Main
{
    public static int total(int a){
        int temp = a;
        int b = 0;
        do{
            temp = temp / 10;
            b ++;
        }while (temp != 0)

        return b;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int in [] = new int [t];

        for (int i = 0; i < t; i ++){
            in[i] = sc.nextInt();
        }

        for(int i = 0; i < t; i ++){
            int s = total(in[i]);

            System.out.println(s);
        }

    }

}


import java.util.*;
public class function {
    public static void main(String args[]){
        Scanner sc = new Scanner (System.in);
        int t = sc.nextInt();
        while (t-- > 0){
            int count=0;
            String n = sc.next();
            System.out.println(n.length());
        }
    }
}


//package codeforcesEC99;

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		StringBuilder answer = new StringBuilder();
		int t = sc.nextInt();
		sc.nextLine();
		while(t-->0) {
			String s = sc.nextLine();
			answer.append(s.length() + "\n");
		}
		System.out.println(answer);
		sc.close();
	}

}


//package codeforcesEC99;

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		StringBuilder answer = new StringBuilder();
		int t = sc.nextInt();
		while(t-->0) {
			sc.nextLine();
			String s = sc.nextLine();
			answer.append(s.length() + "\n");
		}
		System.out.println(answer);
		sc.close();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Stack;

import java.util.StringTokenizer;

    public class Skaba {
        BufferedReader br;
        StringTokenizer st;

        public Skaba() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

    public static void main(String[] args) {
        Skaba r = new Skaba();
        int maara = r.nextInt();
        for (int i = 0; i < maara; i++) {
            System.out.println(check(r.nextLine()));
        }
    }

    public static long check(String k) {
        StringBuilder build = new StringBuilder().append(k).reverse();
        int firstZero = 0;
        for (int i = 0; i < build.toString().length(); i++) {
            if (build.toString().charAt(i) != '0') {
                firstZero = i;
                break;
            }
        }

        build = build.delete(0, firstZero);
        return build.toString().length();
    }

    public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException  e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Stack;

import java.util.StringTokenizer;

    public class Skaba {
        BufferedReader br;
        StringTokenizer st;

        public Skaba() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

    public static void main(String[] args) {
        Skaba r = new Skaba();
        int maara = r.nextInt();
        for (int i = 0; i < maara; i++) {
            System.out.println(check(r.nextLine()));
        }
    }

    public static long check(String k) {
        StringBuilder build = new StringBuilder().append(k).reverse();
        int firstZero = 0;

        return build.toString().length();
    }

    public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException  e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
}


import java.io.*;
import java.util.*;

public class bye
{
	static class InputReader {
		BufferedReader reader;
		StringTokenizer tokenizer;
		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}
		String next() { // reads in the next string
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() { // reads in the next int
			return Integer.parseInt(next());
		}
		public long nextLong() { // reads in the next long
			return Long.parseLong(next());
		}
		public double nextDouble() { // reads in the next double
			return Double.parseDouble(next());
			}
		}
	static InputReader r = new InputReader(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args)
	{
		int t = r.nextInt();
		for (int i = 0; i <= t - 1; i ++)
		{
			String n = r.next();
			pw.println(n.length());
		}
		pw.close();
	}
}


import java.util.*;
public class Test {

    public static void main(String[] args) {
        Scanner in=new Scanner (System.in);
    int t=in.nextInt();
        for (int i = 0; i < t; i++) {
            String s=in.next();
            System.out.println(s.length());

        }
    }

}


import java.io.*;
import java.util.*;
public class stf
{
	public static void main(String args[]) throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int t=0;
		t=Integer.parseInt(br.readLine());
		while(t-->0)
		{
			String a=br.readLine().trim();
			System.out.println(a.length());
		}
	}
}


import java.io.*;
import java.util.*;

public class Main {
  InputStream is;
  PrintWriter out;
  String INPUT = "";

  void solve(int TC) throws Exception {
    pn(ns().length());
  }

  boolean TestCases = true;
  public static void main(String[] args) throws Exception { new Main().run(); }

  void holds(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
  static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}

  void run() throws Exception {
    is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
    out = new PrintWriter(System.out);
    long s = System.currentTimeMillis();
    int T = TestCases ? ni() : 1;
    for(int t=1;t<=T;t++) solve(t);
    out.flush();
    if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
  }

  void p(Object o) { out.print(o); }
  void pn(Object o) { out.println(o); }
  void pni(Object o) { out.println(o);out.flush(); }

  int ni() {
    int num = 0, b;
    boolean minus = false;
    while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
    if(b == '-') {
      minus = true;
      b = readByte();
    }
    while(true) {
      if(b >= '0' && b <= '9'){
        num = num * 10 + (b - '0');
      } else {
        return minus ? -num : num;
      }
      b = readByte();
    }
  }

  long nl() {
    long num = 0;
    int b;
    boolean minus = false;
    while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
    if(b == '-') {
      minus = true;
      b = readByte();
    }
    while(true) {
      if(b >= '0' && b <= '9') {
        num = num * 10 + (b - '0');
      } else {
        return minus ? -num : num;
      }
      b = readByte();
    }
  }

  double nd() { return Double.parseDouble(ns()); }
  char nc() { return (char)skip(); }

  int BUF_SIZE = 1024 * 8;
  byte[] inbuf = new byte[BUF_SIZE];
  int lenbuf = 0, ptrbuf = 0;

  int readByte() {
    if(lenbuf == -1)throw new InputMismatchException();
    if(ptrbuf >= lenbuf){
      ptrbuf = 0;
      try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
      if(lenbuf <= 0)return -1;
    } return inbuf[ptrbuf++];
  }

  boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
  int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

  String ns() {
    int b = skip();
    StringBuilder sb = new StringBuilder();
    while(!(isSpaceChar(b))) {
      sb.appendCodePoint(b); b = readByte();
    } return sb.toString();
  }

  char[] ns(int n) {
    char[] buf = new char[n];
    int b = skip(), p = 0;
    while(p < n && !(isSpaceChar(b))){
      buf[p++] = (char)b;
      b = readByte();
    } return n == p ? buf : Arrays.copyOf(buf, p);
  }

  void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int t;
		String s;
		t = sc.nextInt();
		for (int i = 1; i <= t; i++) {
			s = sc.next();
			System.out.println(s.length());
		}
	}

}


import java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		int t=in.nextInt();
		in.nextLine();
		for(int z=0;z<t;z++)
		{
		    String n=in.nextLine();
		    long sum=n.length();
		    System.out.println(sum);
		}
	}
}


import java.util.Scanner;

public class Always_Newbie
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for(int iop=0;iop<t;iop++)
        {
            String s = sc.next();
            System.out.println(s.length());
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import static java.lang.Math.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.StringTokenizer;
import java.io.PrintStream;
import java.io.PrintWriter;

public class A {

	static int mod = 1000000007;
	static long MOD = 1000000007;
	static long temp = 998244353L;
	static final long M = (int)1e9+7;

	static class Pair implements Comparable<Pair>
	{
		int first, second;
		public Pair(int aa, int bb)
		{
			first = aa; second = bb;
		}
		public int compareTo(Pair p)
		{
//			if(a == p.a) return b - p.b;
//			return a - p.a;
			if(first == p.first) return (second - p.second);
			return (first - p.first);
		}
	}

	/*
	 * IO FOR 2D GRID IN JAVA
	 * char[][] arr = new char[n][m]; //grid in Q.

			for(int i = 0;i<n;i++)
			{
				char[] nowLine = sc.next().toCharArray();
				for(int j = 0;j<m;j++)
				{
					arr[i][j] = nowLine[i];
				}
			}
	 * */

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class Reader {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static boolean isPrime(long n) {
		if(n == 1)
		{
			return false;
		}
		for(long i = 2;i*i<=n;i++)
		{
			if(n%i == 0)
			{
				return false;
			}
		}
		return true;
	}

	public static List<Integer> Sieve(int n)
	{
		boolean prime[] = new boolean[n+1];
		Arrays.fill(prime, true);
		List<Integer> l = new ArrayList<>();

		for (int p=2; p*p<=n; p++)
		{
			if (prime[p] == true)
			{
			    for(int i=p*p; i<=n; i += p)
				{
				    prime[i] = false;
				}
			}
		}

		for (int p=2; p<=n; p++)
		{
		    if (prime[p] == true)
		    {
		       l.add(p);
		    }
		}

		return l;
	}

	public static int gcd(int a, int b)
	{
		if(b == 0)
		 return a;

		else
		return gcd(b,a%b);
	}

	public static long LongGCD(long a, long b)
	{
		if(b == 0)
			 return a;

			else
			return LongGCD(b,a%b);
	}

	public static int lcm(int a, int b)
    {
        return (a / gcd(a, b)) * b;
    }

	public static int phi(int n)  //euler totient function
    {
        int result = 1;
        for (int i = 2; i < n; i++)
            if (gcd(i, n) == 1)
                result++;
        return result;
    }

	public static int[] computePrefix(int arr[], int n)
	{
		int[] prefix = new int[n];
		prefix[0] = arr[0];
		for(int i = 1;i<n;i++)
		{
			prefix[i] = prefix[i-1]+arr[i];
		}

		return prefix;
	}

	public static long fastPow(long x, long n) //include mod at each step if asked and in args of fn too
	{
		if(n == 0)
			return 1;
		else if(n%2 == 0)
			return fastPow(x*x,n/2);
		else
			return x*fastPow(x*x,(n-1)/2);
	}

	   public static long power(long x, long y, long p)
	    {

	        long res = 1;

	        x = x % p;

	        while (y > 0) {
	            if (y % 2 == 1)
	                res = (res * x) % p;

	            y = y >> 1;
	            x = (x * x) % p;
	        }

	        return res;
	    }

	   static long modInverse(long n, long p)
	    {
	        return power(n, p - 2, p);
	    }

	    // Returns nCr % p using Fermat's little theorem.

	    public static long nCr(long n, long r,
	                             long p)
	    {
	          if (n<r)
	              return 0;

	        if (r == 0)
	            return 1;

	        long[] fac = new long[(int)(n) + 1];
	        fac[0] = 1;

	        for (int i = 1; i <= n; i++)
	            fac[i] = fac[i - 1] * i % p;

	        return (fac[(int)(n)] * modInverse(fac[(int)(r)], p)
	                % p * modInverse(fac[(int)(n - r)], p)
	                % p)
	            % p;
	    }

	    public static long[] modInvArr(long n, long mod)
	    {
	    	long[] ans = new long[(int)(n)+1];
			ans[1] = 1;
			for(int i = 2;i <= n;i++)
			{
				ans[i] = (mod - (mod/i) * ans[(int)(mod%i)])%mod;
			}
			return ans;
	    }

		public static int LowerBound(int a[], int x) {
			  int l=-1,r=a.length;
			  while(l+1<r) {
			    int m=(l+r)>>>1;
			    if(a[m]>=x) r=m;
			    else l=m;
			  }
			  return r;
			}

		public static int UpperBound(int a[], int x) {
		    int l=-1;
		    int r=a.length;
		    while(l+1<r) {
		       int m=(l+r)>>>1;
		       if(a[m]<=x) l=m;
		       else r=m;
		    }
		    return l+1;
		}

		public static void Sort(int[] a) {
			List<Integer> l=new ArrayList<>();
			for (int i:a) l.add(i);
			Collections.sort(l);
			//Collections.reverse(l);  //Use to Sort decreasingly
			for (int i=0; i<a.length; i++) a[i]=l.get(i);
		}

		//MODULO OPS for addition and multiplication

		   public static long perfomMod(long x){
		        return ((x%M + M)%M);
		    }
		   public static long addMod(long a, long  b){
		        return perfomMod(perfomMod(a)+perfomMod(b));
		    }
		   public static long mulMod(long  a, long b){
		        return perfomMod(perfomMod(a)*perfomMod(b));
		   }

	public static void main(String[] args)
	{
		Reader sc=new Reader();
		PrintWriter out = new PrintWriter(System.out);

		int t = sc.nextInt();
		while(t-- > 0)
		{
			String s = sc.next();
			System.out.println(s.length());
		}
		out.close();
	}

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import static java.lang.Math.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.StringTokenizer;
import java.io.PrintStream;
import java.io.PrintWriter;
import programs.Main.Pair;

public class A {

	static int mod = 1000000007;
	static long MOD = 1000000007;
	static long temp = 998244353L;
	static final long M = (int)1e9+7;

	static class Pair implements Comparable<Pair>
	{
		int first, second;
		public Pair(int aa, int bb)
		{
			first = aa; second = bb;
		}
		public int compareTo(Pair p)
		{
//			if(a == p.a) return b - p.b;
//			return a - p.a;
			if(first == p.first) return (second - p.second);
			return (first - p.first);
		}
	}

	/*
	 * IO FOR 2D GRID IN JAVA
	 * char[][] arr = new char[n][m]; //grid in Q.

			for(int i = 0;i<n;i++)
			{
				char[] nowLine = sc.next().toCharArray();
				for(int j = 0;j<m;j++)
				{
					arr[i][j] = nowLine[i];
				}
			}
	 * */

	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}

	static class Reader {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static boolean isPrime(long n) {
		if(n == 1)
		{
			return false;
		}
		for(long i = 2;i*i<=n;i++)
		{
			if(n%i == 0)
			{
				return false;
			}
		}
		return true;
	}

	public static List<Integer> Sieve(int n)
	{
		boolean prime[] = new boolean[n+1];
		Arrays.fill(prime, true);
		List<Integer> l = new ArrayList<>();

		for (int p=2; p*p<=n; p++)
		{
			if (prime[p] == true)
			{
			    for(int i=p*p; i<=n; i += p)
				{
				    prime[i] = false;
				}
			}
		}

		for (int p=2; p<=n; p++)
		{
		    if (prime[p] == true)
		    {
		       l.add(p);
		    }
		}

		return l;
	}

	public static int gcd(int a, int b)
	{
		if(b == 0)
		 return a;

		else
		return gcd(b,a%b);
	}

	public static long LongGCD(long a, long b)
	{
		if(b == 0)
			 return a;

			else
			return LongGCD(b,a%b);
	}

	public static int lcm(int a, int b)
    {
        return (a / gcd(a, b)) * b;
    }

	public static int phi(int n)  //euler totient function
    {
        int result = 1;
        for (int i = 2; i < n; i++)
            if (gcd(i, n) == 1)
                result++;
        return result;
    }

	public static int[] computePrefix(int arr[], int n)
	{
		int[] prefix = new int[n];
		prefix[0] = arr[0];
		for(int i = 1;i<n;i++)
		{
			prefix[i] = prefix[i-1]+arr[i];
		}

		return prefix;
	}

	public static long fastPow(long x, long n) //include mod at each step if asked and in args of fn too
	{
		if(n == 0)
			return 1;
		else if(n%2 == 0)
			return fastPow(x*x,n/2);
		else
			return x*fastPow(x*x,(n-1)/2);
	}

	   public static long power(long x, long y, long p)
	    {

	        long res = 1;

	        x = x % p;

	        while (y > 0) {
	            if (y % 2 == 1)
	                res = (res * x) % p;

	            y = y >> 1;
	            x = (x * x) % p;
	        }

	        return res;
	    }

	   static long modInverse(long n, long p)
	    {
	        return power(n, p - 2, p);
	    }

	    // Returns nCr % p using Fermat's little theorem.

	    public static long nCr(long n, long r,
	                             long p)
	    {
	          if (n<r)
	              return 0;

	        if (r == 0)
	            return 1;

	        long[] fac = new long[(int)(n) + 1];
	        fac[0] = 1;

	        for (int i = 1; i <= n; i++)
	            fac[i] = fac[i - 1] * i % p;

	        return (fac[(int)(n)] * modInverse(fac[(int)(r)], p)
	                % p * modInverse(fac[(int)(n - r)], p)
	                % p)
	            % p;
	    }

	    public static long[] modInvArr(long n, long mod)
	    {
	    	long[] ans = new long[(int)(n)+1];
			ans[1] = 1;
			for(int i = 2;i <= n;i++)
			{
				ans[i] = (mod - (mod/i) * ans[(int)(mod%i)])%mod;
			}
			return ans;
	    }

		public static int LowerBound(int a[], int x) {
			  int l=-1,r=a.length;
			  while(l+1<r) {
			    int m=(l+r)>>>1;
			    if(a[m]>=x) r=m;
			    else l=m;
			  }
			  return r;
			}

		public static int UpperBound(int a[], int x) {
		    int l=-1;
		    int r=a.length;
		    while(l+1<r) {
		       int m=(l+r)>>>1;
		       if(a[m]<=x) l=m;
		       else r=m;
		    }
		    return l+1;
		}

		public static void Sort(int[] a) {
			List<Integer> l=new ArrayList<>();
			for (int i:a) l.add(i);
			Collections.sort(l);
			//Collections.reverse(l);  //Use to Sort decreasingly
			for (int i=0; i<a.length; i++) a[i]=l.get(i);
		}

		//MODULO OPS for addition and multiplication

		   public static long perfomMod(long x){
		        return ((x%M + M)%M);
		    }
		   public static long addMod(long a, long  b){
		        return perfomMod(perfomMod(a)+perfomMod(b));
		    }
		   public static long mulMod(long  a, long b){
		        return perfomMod(perfomMod(a)*perfomMod(b));
		   }

	public static void main(String[] args)
	{
		Reader sc=new Reader();
		PrintWriter out = new PrintWriter(System.out);

		int t = sc.nextInt();
		while(t-- > 0)
		{
			String s = sc.next();
			System.out.println(s.length());
		}
		out.close();
	}

}


import java.util.*;

import static java.lang.Math.*;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.math.BigInteger;

public class Main
{

	static int mod = 1000000007;
	static long MOD = 1000000007;
	static long temp = 998244353L;
	static final long M = (int)1e9+7;

	static class Pair implements Comparable<Pair>
	{
		int first, second;
		public Pair(int aa, int bb)
		{
			first = aa; second = bb;
		}
		public int compareTo(Pair p)
		{
//			if(a == p.a) return b - p.b;
//			return a - p.a;
			if(first == p.first) return (second - p.second);
			return (first - p.first);
		}
	}

	/*
	 * IO FOR 2D GRID IN JAVA
	 * char[][] arr = new char[n][m]; //grid in Q.

			for(int i = 0;i<n;i++)
			{
				char[] nowLine = sc.next().toCharArray();
				for(int j = 0;j<m;j++)
				{
					arr[i][j] = nowLine[i];
				}
			}
	 * */

	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String next() throws IOException
		{
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		int[] readArray(int n) throws IOException {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}

		long[] longReadArray(int n) throws IOException {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}

		public BigInteger nextBigInteger() {
			// TODO Auto-generated method stub
			return null;
		}

	}

	public static boolean isPrime(long n) {
		if(n == 1)
		{
			return false;
		}
		for(long i = 2;i*i<=n;i++)
		{
			if(n%i == 0)
			{
				return false;
			}
		}
		return true;
	}

	public static List<Integer> Sieve(int n)
	{
		boolean prime[] = new boolean[n+1];
		Arrays.fill(prime, true);
		List<Integer> l = new ArrayList<>();

		for (int p=2; p*p<=n; p++)
		{
			if (prime[p] == true)
			{
			    for(int i=p*p; i<=n; i += p)
				{
				    prime[i] = false;
				}
			}
		}

		for (int p=2; p<=n; p++)
		{
		    if (prime[p] == true)
		    {
		       l.add(p);
		    }
		}

		return l;
	}

	public static int gcd(int a, int b)
	{
		if(b == 0)
		 return a;

		else
		return gcd(b,a%b);
	}

	public static long LongGCD(long a, long b)
	{
		if(b == 0)
			 return a;

			else
			return LongGCD(b,a%b);
	}

	public static int lcm(int a, int b)
    {
        return (a / gcd(a, b)) * b;
    }

	public static int phi(int n)  //euler totient function
    {
        int result = 1;
        for (int i = 2; i < n; i++)
            if (gcd(i, n) == 1)
                result++;
        return result;
    }

	public static int[] computePrefix(int arr[], int n)
	{
		int[] prefix = new int[n];
		prefix[0] = arr[0];
		for(int i = 1;i<n;i++)
		{
			prefix[i] = prefix[i-1]+arr[i];
		}

		return prefix;
	}

	public static long fastPow(long x, long n) //include mod at each step if asked and in args of fn too
	{
		if(n == 0)
			return 1;
		else if(n%2 == 0)
			return fastPow(x*x,n/2);
		else
			return x*fastPow(x*x,(n-1)/2);
	}

	   public static long power(long x, long y, long p)
	    {

	        long res = 1;

	        x = x % p;

	        while (y > 0) {
	            if (y % 2 == 1)
	                res = (res * x) % p;

	            y = y >> 1;
	            x = (x * x) % p;
	        }

	        return res;
	    }

	   static long modInverse(long n, long p)
	    {
	        return power(n, p - 2, p);
	    }

	    // Returns nCr % p using Fermat's little theorem.

	    public static long nCr(long n, long r,
	                             long p)
	    {
	          if (n<r)
	              return 0;

	        if (r == 0)
	            return 1;

	        long[] fac = new long[(int)(n) + 1];
	        fac[0] = 1;

	        for (int i = 1; i <= n; i++)
	            fac[i] = fac[i - 1] * i % p;

	        return (fac[(int)(n)] * modInverse(fac[(int)(r)], p)
	                % p * modInverse(fac[(int)(n - r)], p)
	                % p)
	            % p;
	    }

	    public static long[] modInvArr(long n, long mod)
	    {
	    	long[] ans = new long[(int)(n)+1];
			ans[1] = 1;
			for(int i = 2;i <= n;i++)
			{
				ans[i] = (mod - (mod/i) * ans[(int)(mod%i)])%mod;
			}
			return ans;
	    }

		public static int LowerBound(int a[], int x) {
			  int l=-1,r=a.length;
			  while(l+1<r) {
			    int m=(l+r)>>>1;
			    if(a[m]>=x) r=m;
			    else l=m;
			  }
			  return r;
			}

		public static int UpperBound(int a[], int x) {
		    int l=-1;
		    int r=a.length;
		    while(l+1<r) {
		       int m=(l+r)>>>1;
		       if(a[m]<=x) l=m;
		       else r=m;
		    }
		    return l+1;
		}

		public static void Sort(int[] a) {
			List<Integer> l=new ArrayList<>();
			for (int i:a) l.add(i);
			Collections.sort(l);
			//Collections.reverse(l);  //Use to Sort decreasingly
			for (int i=0; i<a.length; i++) a[i]=l.get(i);
		}

		//MODULO OPS for addition and multiplication

		   public static long perfomMod(long x){
		        return ((x%M + M)%M);
		    }
		   public static long addMod(long a, long  b){
		        return perfomMod(perfomMod(a)+perfomMod(b));
		    }
		   public static long mulMod(long  a, long b){
		        return perfomMod(perfomMod(a)*perfomMod(b));
		   }

		public static void main(String[] args) throws IOException
		{
			Reader sc = new Reader();
			PrintWriter out = new PrintWriter(System.out);

			int t = sc.nextInt();
			while(t-- > 0)
			{
				double x = sc.nextDouble();
				String temp = String.format("%.0f",x);
				System.out.println((temp.length()));
			}

			out.close();
		}
}


import java.util.*;

public class StrangeFunctions {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int t = sc.nextInt();

        do {
            String s = new String();

            if(sc.hasNext()){
                s= sc.next();
            }

            System.out.println(s.length());

            t--;
        } while (t > 0);
    }

}


import java.util.*;

public class UVA10550 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int T = s.nextInt();
		for(int tt= 0;tt<T;tt++) {
			String in = s.next();
			int c = in.length();
			//int pos = c-1;
			//while(in.charAt(pos--)=='0'){
		//		c--;
	//		}
			System.out.println(c);
		}
	}
}


import java.util.*;

public class UVA10550 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int T = s.nextInt();
		for(int tt= 0;tt<T;tt++) {
			String in = s.next();
			int c = in.length();
			int pos = c-1;
			while(in.charAt(pos--)=='0'){
				c--;
			}
			System.out.println(c);
		}
	}
}


import java.io.*;
import java.math.*;
import java.util.*;

public class A {

	static int INF = 1000000007;

	public static void main(String[] args) {
		int test = fs.nextInt();
//		int test = 1;
		for (int cases = 0; cases < test; cases++) {
			String s = fs.next();

			int a = s.length();
			if (a == 1) {
				System.out.println(1);
			} else {
				System.out.println(a);
			}
		}
	}

	static long power(long x, long y, long p) {
		long res = 1;
		x = x % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

	static long modInverse(long n, long p) {
		return power(n, p - 2, p);
	}

	static long nCrModPFermat(long n, long r, long p) {
		long ans1 = 1;
		long i = n;
		long k = r;
		while (k > 0) {
			ans1 = mul(ans1, i, p);
			i--;
			k--;
		}
		long ans2 = 1;
		while (r > 0) {
			ans2 = mul(ans2, r, p);
			r--;
		}
		r = modInverse(ans2, p);
		ans1 = mul(ans1, r, p);
		return ans1;
	}

	static long facCalc(long total) {
		long ans = 1;
		for (long i = 2; i <= total; i++) {
			ans = mul(ans, i, INF);
		}
		return ans;
	}

	static long mul(long a, long b, long p) {
		return ((a % p) * (b % p)) % p;
	}

	static void sieve() {
		boolean prime[] = new boolean[101];
		Arrays.fill(prime, true);
		prime[1] = false;
		for (int i = 2; i * i <= prime.length - 1; i++) {
			for (int j = i * i; j <= prime.length - 1; j += i) {
				prime[j] = false;
			}
		}
	}

	public static int[] radixSort(int[] f) {
		return radixSort(f, f.length);
	}

	public static int[] radixSort(int[] f, int n) {
		int[] to = new int[n];
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] & 0xffff)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] & 0xffff]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] >>> 16)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] >>> 16]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		return f;
	}

	static class Pair {
		int first, second;

		public Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static class LongPair {
		long first;
		long second;

		LongPair(long a, long b) {
			this.first = a;
			this.second = b;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static long expmodulo(long a, long b, long c) {
		long x = 1;
		long y = a;
		while (b > 0) {
			if (b % 2 == 1) {
				x = (x * y) % c;
			}
			y = (y * y) % c; // squaring the base
			b /= 2;
		}
		return (long) x % c;
	}

	// static int modInverse(int a, int m) {
	// int m0 = m;
	// int y = 0, x = 1;
	//
	// if (m == 1)
	// return 0;
	//
	// while (a > 1) {
	// int q = a / m;
	// int t = m;
	// m = a % m;
	// a = t;
	// t = y;
	// y = x - q * y;
	// x = t;
	// }
	// if (x < 0)
	// x += m0;
	// return x;
	// }

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sortMyMapusingValues(HashMap<Integer, Integer> hm) {

		List<Map.Entry<Integer, Integer>> capitalList = new LinkedList<>(hm.entrySet());

		Collections.sort(capitalList, new Comparator<Map.Entry<Integer, Integer>>() {
			public int compare(Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2) {
				return (o1.getValue()).compareTo(o2.getValue());
			}
		});
		HashMap<Integer, Integer> result = new HashMap<>();
		for (Map.Entry<Integer, Integer> entry : capitalList) {
			result.put(entry.getKey(), entry.getValue());
		}
	}

	static void primeFactors(int n) {
		while (n % 2 == 0) {
			System.out.print(2 + " ");
			n /= 2;
		}
		for (int i = 3; i <= Math.sqrt(n); i += 2) {
			while (n % i == 0) {
				System.out.print(i + " ");
				n /= i;
			}
		}
		if (n > 2)
			System.out.print(n);
	}

	static boolean isPrime(long n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		long sq = (long) Math.sqrt(n);
		for (int i = 5; i <= sq; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

	}

	private static final FastReader fs = new FastReader();
	private static final OutputWriter op = new OutputWriter(System.out);
}


import java.io.*;
import java.math.*;
import java.util.*;

public class A {

	static int INF = 1000000007;

	public static void main(String[] args) {
		int test = fs.nextInt();
//		int test = 1;
		for (int cases = 0; cases < test; cases++) {
			String s = fs.next();

			int a = s.length();
			if (a == 1) {
				System.out.println(1);
			} else {
				int ans = a - 1;
				if (s.charAt(a - 1) == '0') {
					++ans;
				}
				System.out.println(ans + 1);
			}
		}
	}

	static long power(long x, long y, long p) {
		long res = 1;
		x = x % p;
		while (y > 0) {
			if (y % 2 == 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

	static long modInverse(long n, long p) {
		return power(n, p - 2, p);
	}

	static long nCrModPFermat(long n, long r, long p) {
		long ans1 = 1;
		long i = n;
		long k = r;
		while (k > 0) {
			ans1 = mul(ans1, i, p);
			i--;
			k--;
		}
		long ans2 = 1;
		while (r > 0) {
			ans2 = mul(ans2, r, p);
			r--;
		}
		r = modInverse(ans2, p);
		ans1 = mul(ans1, r, p);
		return ans1;
	}

	static long facCalc(long total) {
		long ans = 1;
		for (long i = 2; i <= total; i++) {
			ans = mul(ans, i, INF);
		}
		return ans;
	}

	static long mul(long a, long b, long p) {
		return ((a % p) * (b % p)) % p;
	}

	static void sieve() {
		boolean prime[] = new boolean[101];
		Arrays.fill(prime, true);
		prime[1] = false;
		for (int i = 2; i * i <= prime.length - 1; i++) {
			for (int j = i * i; j <= prime.length - 1; j += i) {
				prime[j] = false;
			}
		}
	}

	public static int[] radixSort(int[] f) {
		return radixSort(f, f.length);
	}

	public static int[] radixSort(int[] f, int n) {
		int[] to = new int[n];
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] & 0xffff)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] & 0xffff]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		{
			int[] b = new int[65537];
			for (int i = 0; i < n; i++)
				b[1 + (f[i] >>> 16)]++;
			for (int i = 1; i <= 65536; i++)
				b[i] += b[i - 1];
			for (int i = 0; i < n; i++)
				to[b[f[i] >>> 16]++] = f[i];
			int[] d = f;
			f = to;
			to = d;
		}
		return f;
	}

	static class Pair {
		int first, second;

		public Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static class LongPair {
		long first;
		long second;

		LongPair(long a, long b) {
			this.first = a;
			this.second = b;
		}

		public String toString() {
			return "[" + first + "," + second + "]";
		}
	}

	static long expmodulo(long a, long b, long c) {
		long x = 1;
		long y = a;
		while (b > 0) {
			if (b % 2 == 1) {
				x = (x * y) % c;
			}
			y = (y * y) % c; // squaring the base
			b /= 2;
		}
		return (long) x % c;
	}

	// static int modInverse(int a, int m) {
	// int m0 = m;
	// int y = 0, x = 1;
	//
	// if (m == 1)
	// return 0;
	//
	// while (a > 1) {
	// int q = a / m;
	// int t = m;
	// m = a % m;
	// a = t;
	// t = y;
	// y = x - q * y;
	// x = t;
	// }
	// if (x < 0)
	// x += m0;
	// return x;
	// }

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sortMyMapusingValues(HashMap<Integer, Integer> hm) {

		List<Map.Entry<Integer, Integer>> capitalList = new LinkedList<>(hm.entrySet());

		Collections.sort(capitalList, new Comparator<Map.Entry<Integer, Integer>>() {
			public int compare(Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2) {
				return (o1.getValue()).compareTo(o2.getValue());
			}
		});
		HashMap<Integer, Integer> result = new HashMap<>();
		for (Map.Entry<Integer, Integer> entry : capitalList) {
			result.put(entry.getKey(), entry.getValue());
		}
	}

	static void primeFactors(int n) {
		while (n % 2 == 0) {
			System.out.print(2 + " ");
			n /= 2;
		}
		for (int i = 3; i <= Math.sqrt(n); i += 2) {
			while (n % i == 0) {
				System.out.print(i + " ");
				n /= i;
			}
		}
		if (n > 2)
			System.out.print(n);
	}

	static boolean isPrime(long n) {
		// Corner cases
		if (n <= 1)
			return false;
		if (n <= 3)
			return true;
		if (n % 2 == 0 || n % 3 == 0)
			return false;

		long sq = (long) Math.sqrt(n);
		for (int i = 5; i <= sq; i = i + 6)
			if (n % i == 0 || n % (i + 2) == 0)
				return false;

		return true;
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

	}

	private static final FastReader fs = new FastReader();
	private static final OutputWriter op = new OutputWriter(System.out);
}


import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

	public static void main(String[] args) throws IOException
	{
		FastScanner f = new FastScanner();
		int t=f.nextInt();
//		int t=1;
		while(t-->0){
//			int n=f.nextInt();
//			int ans=1000000;
			String a=f.next();
			System.out.println(a.length());

		}
	}
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
		long[] readLongArray(int n) {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class firstProg {
	public static void main(String[] args) throws IOException {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		int t = Integer.parseInt(sc.readLine());
		while (--t >= 0) {
			System.out.println(sc.readLine().length());
		}
	}
}


import java.io.*;
public class codeforces
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(br.readLine());
        while(t-->0)
        {
            int result=0;
            String s=br.readLine();
            if(s.length()==1)
            {
                System.out.println("1");
            }
            else
            {
                if(s.length()>1)
                {
                    System.out.println(s.length());
                }
            }
        }
    }
}


import java.io.*;
public class codeforces
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(br.readLine());
        while(t-->0)
        {
            String s=br.readLine();
            if(s.length()==1)
            {
                System.out.println("1");
            }
            else
            {
                System.out.println(s.length()-1);
            }
        }
    }
}


import java.io.*;
public class codeforces
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(br.readLine());
        while(t-->0)
        {
            int result=0;
            String s=br.readLine();
            if(s.length()==1)
            {
                System.out.println("1");
            }
            else
            {
                if(s.length()>2)
                {
                    System.out.println(s.length());
                }
            }
        }
    }
}
//Code contributed by Rahul Raj Tripathi


import java.lang.*;
import java.util.*;

public class Codeforces
{

    public static void main(String[] args)
    {
        Scanner s=new Scanner(System.in);
        int t=s.nextInt();
         s.nextLine();
        for(int i=0;i<t;i++)
        {

           String str=s.nextLine();
           System.out.println(str.length());
        }
    }
}


import java.lang.*;
import java.util.*;

public class Codeforces
{

    public static void main(String[] args)
    {
        Scanner s=new Scanner(System.in);
        int t=s.nextInt();
        for(int i=0;i<t;i++)
        {
            int n=s.nextInt();
            String str=Integer.toString(n);

            System.out.println(str.length());
        }
    }
}


import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.BufferedReader;
import java.io.IOException;
public class infOly6  {

	public static void main(String[] args) throws IOException {

		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		int x = Integer.parseInt(r.readLine());
		for( int i = 0; i < x; i ++) {
			String n = r.readLine();
			System.out.println(n.length());
		}

	}
}


import com.sun.source.tree.Tree;

import java.io.*;
import java.util.*;

//          ▄▀▀▀▀▄  ▄▀▀▄ ▄▄   ▄▀▀▀▀▄   ▄▀▀▄ █  ▄▀▀█▄▄▄▄  ▄▀▀▄▀▀▀▄  ▄▀▀▀▀▄  ▄▀▀▀▀▄  ▄▀▀▀▀▄
//         █ █   ▐ █  █   ▄▀ █      █ █  █ ▄▀ ▐  ▄▀   ▐ █   █   █ █ █   ▐ █ █   ▐ █ █   ▐
//            ▀▄   ▐  █▄▄▄█  █      █ ▐  █▀▄    █▄▄▄▄▄  ▐  █▀▀█▀     ▀▄      ▀▄      ▀▄
//         ▀▄   █     █   █  ▀▄    ▄▀   █   █   █    ▌   ▄▀    █  ▀▄   █  ▀▄   █  ▀▄   █
//          █▀▀▀     ▄▀  ▄▀    ▀▀▀▀   ▄▀   █   ▄▀▄▄▄▄   █     █    █▀▀▀    █▀▀▀    █▀▀▀
//          ▐       █   █             █    ▐   █    ▐   ▐     ▐    ▐       ▐       ▐
//                 ▐   ▐             ▐        ▐

import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        int t = nextInt();
        for (int qqq = 0; qqq < t; qqq++) {
            pw.println(next().length());
        }
        pw.close();
    }

    static StringTokenizer st = new StringTokenizer("");
    static BufferedReader br;

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}


import com.sun.source.tree.Tree;

import java.io.*;
import java.util.*;

//          ▄▀▀▀▀▄  ▄▀▀▄ ▄▄   ▄▀▀▀▀▄   ▄▀▀▄ █  ▄▀▀█▄▄▄▄  ▄▀▀▄▀▀▀▄  ▄▀▀▀▀▄  ▄▀▀▀▀▄  ▄▀▀▀▀▄
//         █ █   ▐ █  █   ▄▀ █      █ █  █ ▄▀ ▐  ▄▀   ▐ █   █   █ █ █   ▐ █ █   ▐ █ █   ▐
//            ▀▄   ▐  █▄▄▄█  █      █ ▐  █▀▄    █▄▄▄▄▄  ▐  █▀▀█▀     ▀▄      ▀▄      ▀▄
//         ▀▄   █     █   █  ▀▄    ▄▀   █   █   █    ▌   ▄▀    █  ▀▄   █  ▀▄   █  ▀▄   █
//          █▀▀▀     ▄▀  ▄▀    ▀▀▀▀   ▄▀   █   ▄▀▄▄▄▄   █     █    █▀▀▀    █▀▀▀    █▀▀▀
//          ▐       █   █             █    ▐   █    ▐   ▐     ▐    ▐       ▐       ▐
//                 ▐   ▐             ▐        ▐

import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        int t = nextInt();
        for (int qqq = 0; qqq < t; qqq++) {
            char[] a = next().toCharArray();
            pw.println(a.length);
        }
        pw.close();
    }

    static StringTokenizer st = new StringTokenizer("");
    static BufferedReader br;

    static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}


import java.util.Scanner;

public class l {
    public static void main(String args[]){
        Scanner s=new Scanner(System.in);
        int t=s.nextInt();
        for(int i=0;i<t;i++){
            String str=s.next();
            System.out.println(str.length());
        }
    }
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class cf1455a {

    public static void main(String[] args) throws IOException {
        int t = ri();
        while (t --> 0) {
            prln(rcha().length);
        }
        close();
    }

    static BufferedReader __in = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter __out = new PrintWriter(new OutputStreamWriter(System.out));
    static StringTokenizer input;
    static Random __rand = new Random();

    // references
    // IBIG = 1e9 + 7
    // IMAX ~= 2e9
    // LMAX ~= 9e18

    // constants
    static final int IBIG = 1000000007;
    static final int IMAX = 2147483647;
    static final int IMIN = -2147483648;
    static final long LMAX = 9223372036854775807L;
    static final long LMIN = -9223372036854775808L;
    // math util
    static int minof(int a, int b, int c) {return min(a, min(b, c));}
    static int minof(int... x) {if (x.length == 1) return x[0]; if (x.length == 2) return min(x[0], x[1]); if (x.length == 3) return min(x[0], min(x[1], x[2])); int min = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] < min) min = x[i]; return min;}
    static long minof(long a, long b, long c) {return min(a, min(b, c));}
    static long minof(long... x) {if (x.length == 1) return x[0]; if (x.length == 2) return min(x[0], x[1]); if (x.length == 3) return min(x[0], min(x[1], x[2])); long min = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] < min) min = x[i]; return min;}
    static int maxof(int a, int b, int c) {return max(a, max(b, c));}
    static int maxof(int... x) {if (x.length == 1) return x[0]; if (x.length == 2) return max(x[0], x[1]); if (x.length == 3) return max(x[0], max(x[1], x[2])); int max = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] > max) max = x[i]; return max;}
    static long maxof(long a, long b, long c) {return max(a, max(b, c));}
    static long maxof(long... x) {if (x.length == 1) return x[0]; if (x.length == 2) return max(x[0], x[1]); if (x.length == 3) return max(x[0], max(x[1], x[2])); long max = x[0]; for (int i = 1; i < x.length; ++i) if (x[i] > max) max = x[i]; return max;}
    static int powi(int a, int b) {if (a == 0) return 0; int ans = 1; while (b > 0) {if ((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static long powl(long a, int b) {if (a == 0) return 0; long ans = 1; while (b > 0) {if ((b & 1) > 0) ans *= a; a *= a; b >>= 1;} return ans;}
    static int fli(double d) {return (int) d;}
    static int cei(double d) {return (int) ceil(d);}
    static long fll(double d) {return (long) d;}
    static long cel(double d) {return (long) ceil(d);}
    static int gcf(int a, int b) {return b == 0 ? a : gcf(b, a % b);}
    static long gcf(long a, long b) {return b == 0 ? a : gcf(b, a % b);}
    static int lcm(int a, int b) {return a * b / gcf(a, b);}
    static long lcm(long a, long b) {return a * b / gcf(a, b);}
    static int randInt(int min, int max) {return __rand.nextInt(max - min + 1) + min;}
    static long mix(long x) {x += 0x9e3779b97f4a7c15L; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9L; x = (x ^ (x >> 27)) * 0x94d049bb133111ebL; return x ^ (x >> 31);}
    // array util
    static void reverse(int[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {int swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(long[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {long swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(double[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {double swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void reverse(char[] a) {for (int i = 0, n = a.length, half = n / 2; i < half; ++i) {char swap = a[i]; a[i] = a[n - i - 1]; a[n - i - 1] = swap;}}
    static void shuffle(int[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); int swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void shuffle(long[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); long swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void shuffle(double[] a) {int n = a.length - 1; for (int i = 0; i < n; ++i) {int ind = randInt(i, n); double swap = a[i]; a[i] = a[ind]; a[ind] = swap;}}
    static void rsort(int[] a) {shuffle(a); sort(a);}
    static void rsort(long[] a) {shuffle(a); sort(a);}
    static void rsort(double[] a) {shuffle(a); sort(a);}
    static int[] copy(int[] a) {int[] ans = new int[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static long[] copy(long[] a) {long[] ans = new long[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static double[] copy(double[] a) {double[] ans = new double[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    static char[] copy(char[] a) {char[] ans = new char[a.length]; for (int i = 0; i < a.length; ++i) ans[i] = a[i]; return ans;}
    // input
    static void r() throws IOException {input = new StringTokenizer(rline());}
    static int ri() throws IOException {return Integer.parseInt(rline());}
    static long rl() throws IOException {return Long.parseLong(rline());}
    static double rd() throws IOException {return Double.parseDouble(rline());}
    static int[] ria(int n) throws IOException {int[] a = new int[n]; r(); for (int i = 0; i < n; ++i) a[i] = ni(); return a;}
    static int[] riam1(int n) throws IOException {int[] a = new int[n]; r(); for (int i = 0; i < n; ++i) a[i] = ni() - 1; return a;}
    static long[] rla(int n) throws IOException {long[] a = new long[n]; r(); for (int i = 0; i < n; ++i) a[i] = nl(); return a;}
    static double[] rda(int n) throws IOException {double[] a = new double[n]; r(); for (int i = 0; i < n; ++i) a[i] = nd(); return a;}
    static char[] rcha() throws IOException {return rline().toCharArray();}
    static String rline() throws IOException {return __in.readLine();}
    static String n() {return input.nextToken();}
    static int rni() throws IOException {r(); return ni();}
    static int ni() {return Integer.parseInt(n());}
    static long rnl() throws IOException {r(); return nl();}
    static long nl() {return Long.parseLong(n());}
    static double rnd() throws IOException {r(); return nd();}
    static double nd() {return Double.parseDouble(n());}
    // output
    static void pr(int i) {__out.print(i);}
    static void prln(int i) {__out.println(i);}
    static void pr(long l) {__out.print(l);}
    static void prln(long l) {__out.println(l);}
    static void pr(double d) {__out.print(d);}
    static void prln(double d) {__out.println(d);}
    static void pr(char c) {__out.print(c);}
    static void prln(char c) {__out.println(c);}
    static void pr(char[] s) {__out.print(new String(s));}
    static void prln(char[] s) {__out.println(new String(s));}
    static void pr(String s) {__out.print(s);}
    static void prln(String s) {__out.println(s);}
    static void pr(Object o) {__out.print(o);}
    static void prln(Object o) {__out.println(o);}
    static void prln() {__out.println();}
    static void pryes() {prln("yes");}
    static void pry() {prln("Yes");}
    static void prY() {prln("YES");}
    static void prno() {prln("no");}
    static void prn() {prln("No");}
    static void prN() {prln("NO");}
    static boolean pryesno(boolean b) {prln(b ? "yes" : "no"); return b;};
    static boolean pryn(boolean b) {prln(b ? "Yes" : "No"); return b;}
    static boolean prYN(boolean b) {prln(b ? "YES" : "NO"); return b;}
    static void prln(int... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static void prln(long... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static void prln(double... a) {for (int i = 0, len = a.length - 1; i < len; pr(a[i]), pr(' '), ++i); if (a.length > 0) prln(a[a.length - 1]); else prln();}
    static <T> void prln(Collection<T> c) {int n = c.size() - 1; Iterator<T> iter = c.iterator(); for (int i = 0; i < n; pr(iter.next()), pr(' '), ++i); if (n >= 0) prln(iter.next()); else prln();}
    static void h() {prln("hlfd"); flush();}
    static void flush() {__out.flush();}
    static void close() {__out.close();}
}


import java.util.HashSet;
import java.util.Scanner;

public class Raund {

    public static void main(String[] args) {

        int t = Reader.readInt();

        while (t --> 0) {
            String line = Reader.readLine();

            Writer.add(line.length());
            Writer.lineBreak();

        }

        Writer.lineBreak();
        Writer.write();

    }

    public static long gx(long x) {
        long fx = Long.parseLong(reverseLine(Long.toString(x)));
        long ffx = Long.parseLong(reverseLine(Long.toString(fx)));
        return x / ffx;
    }

    public static String reverseLine(String line) {
        String result = "";
        for (int i = line.length() - 1; i >= 0; i--) {
            result = result + line.charAt(i);
        }
        return result;
    }

    public static String massToString(HashSet<Long> mass) {
        StringBuilder builder = new StringBuilder();
        for (Long m : mass) {
            builder.append(m).append(" ");
        }
        return builder.toString();
    }

    public static class Reader {
        public static Scanner in = new Scanner(System.in);

        public static int readInt() {
            return in.nextInt();
        }

        public static String readLine() {
            return in.next();
        }

        public static long readLong() {
            return in.nextLong();
        }
    }

    public static class Writer {
        public static StringBuilder builder = new StringBuilder();

        public static void add(String line) {
            builder.append(line);
        }

        public static void add(int num) {
            builder.append(num);
        }

        public static void add(long num) {
            builder.append(num);
        }

        public static void addPob() {
            builder.append(" ");
        }

        public static void lineBreak() {
            builder.append("\n");
        }

        public static void clear() {
            builder.delete(0, builder.length());
        }

        public static void write() {
            System.out.println(builder.toString());
        }

    }
}


import java.io.*;
import java.util.*;

public class CodeChef2 {

	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

	static class Pair{
		int x,y;

		public Pair(int x,int y) {
			this.x=x;
			this.y=y;
		}
	}

    public static void main(String[] args) throws Exception {
        FastReader sc=new FastReader();
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));

        int t=sc.nextInt();
        long M=1000000007l;

        outer:while(t-- > 0) {

        	String n=sc.next();
//        	System.out.println();
        	bw.append(n.length()+"\n");
        }
        bw.close();
    }

    private static int getNext2(long a) {
		int i=0;
    	while(1<<i < a) {
    		i++;
    	}
		return 1<<i;
	}

//	int n=sc.nextInt();
//	int m=sc.nextInt();
//
//	HashMap<Integer,Pair> vertex=new HashMap<>();
//	HashMap<Integer,ArrayList<Integer>> graph=new HashMap<>();
//
//	for(int i=0;i<m;i++) {
//		vertex.put(i+1,new Pair(sc.nextInt(),sc.nextInt()));
//		graph.put(i+1, new ArrayList<>());
//	}
//
//	for(int i:vertex.keySet()) {
//		Pair p = vertex.get(i);
//		int x=p.x;
//		int y=p.y;
//
//		for(int j:vertex.keySet()) {
//			if(vertex.get(j).x ==x && vertex.get(j).y==y) {
//				continue;
//			}
//			if(vertex.get(j).x ==x || vertex.get(j).y ==y) {
//				graph.get(i).add(j);
//			}
//		}
//	}
//
////	graph.forEach((i,j)->System.out.println(i+":"+j));
//
//	boolean[] visited=new boolean[m+1];
//
//	LinkedList<Integer> stack=new LinkedList<>();
//
//	stack.push(1);
//	while(!stack.isEmpty()) {
//
//		int cur=stack.pop();
//		if(visited[cur]) {
//			continue;
//		}
//		visited[cur]=true;
//		bw.append(cur+" ");
//
//		for(int child:graph.get(cur)) {
//			if(!visited[child])
//				stack.push(child);
//		}
//	}

	static ArrayList<Integer> getDivisor(int n){
    	ArrayList<Integer> div=new ArrayList<>();

        for (int i=1; i*i <=n; i++)
        {
            if (n%i==0)
            {
                if (n/i == i)
                    div.add(i);
                else {
                    div.add(i);
                    div.add(n/i);
                }
            }
        }

        return div;
    }
    static int gcd(int a,int b) {
    	return b==0?a:gcd(b,a%b);
    }

	static int MAXN = 1000001;
	static int[] spf=new int[MAXN];

    static void sieveSmallestFactor()
    {
        spf[1] = 1;

        for (int i=2; i<MAXN; i++)
        	spf[i] = i;

        for (int i=4; i<MAXN; i+=2)
            spf[i] = 2;

        for (int i=3; i*i<MAXN; i++)
        {
            if (spf[i] == i)
            {
                for (int j=i*i; j<MAXN; j+=i)
                    if (spf[j]==j)
                        spf[j] = i;
            }
        }
    }

	private static HashMap<Long,Integer> PrimeFactorizationmap(long n) {
		int count=0;

		HashMap<Long,Integer> factors=new HashMap<>();
		if(n==1) {
			factors.put( 1l,1);
			return factors;
		}else {
			for(long i=2; i*i <= n ;i++) {
				long z=n;
				if(z%i==0) {
					count=0;
					while(z%i==0) {
						count++;
						z=z/i;
					}
					factors.put(i+0l,count);
				}
			}
			if(n>1) {
				factors.put(n,1);
			}
		}
		return factors;
	}

    static HashMap<Integer,Integer> getprimeFactors(int n)
    {
        HashMap<Integer,Integer> ret = new HashMap<>();
        while (n > 1)
        {
        	if(ret.containsKey(spf[n])) {
        		ret.put(spf[n],ret.get(spf[n])+1);
        	}else {
        		ret.put(spf[(int) n],1);
        	}
            n = n / spf[n];
        }

        return ret;
    }

    static ArrayList<Integer> getPrimeSieve(){
		int primesieve[]=new int[1000001];

		Arrays.fill(primesieve,0);

		for(int i=2;i*i<primesieve.length;i++) {
			if(primesieve[i]==0)
				for(int j=i*i;j<primesieve.length;j+=i) {
						primesieve[j]=1;
				}
		}

		ArrayList<Integer> prime=new ArrayList<>();
		for(int i=2;i<primesieve.length;i++) {
			if(primesieve[i]==0) {
				prime.add(i);
			}
		}
		return prime;
    }

	private static boolean checkPrimeRM(long n,int k) {
		if(n<=4) {
			return n==2||n==3;
		}

		int s=0;
		long d=n-1;

		while((d&1) != 1) {
			d=d/2;
			s++;
		}

		for(int i=0;i<k;i++) {
			long a=2+(int)Math.random()*(n-4);
			if(isComposite(a,s,d,n)) {
				return false;
			}
		}

		return true;
	}

	private static boolean isComposite(long a, int s, long d, long n) {
		long x=power(a,d,n);

		if(x==1 || x==n-1) {
			return false;
		}

		for(int i=0;i<s;i++){
			if(x%(n-1)==0) {
				return false;
			}
			x=(x*x)%n;
		}

		return true;
	}

	private static long power(long a, long d,long n) {
		long res=1;
		while(d != 0) {
			if((d&1)==1) {
				res=(res*a)%n;
			}
			d>>=1;
			a=(a*a)%n;
		}
		return res;
	}

    public static HashSet<Long> getPrimeLtoR(int l,int r,List<Integer> prime) {
		if(l==1) l++;

		int[] arr=new int[r-l+1];

		Arrays.fill(arr,0);

		for(int i: prime ){

			if(i*i<=r) {

				int j=(l/i)*i;
				if(j<l)
					j+=i;
				for(;j<=r;j+=i) {
					if(j!=i)
						arr[j-l]=1;
				}
			}else {
				break;
			}

		}

		HashSet<Long> primeLtoR=new HashSet<>();

		for(int i=0;i<arr.length;i++) {
			if(arr[i]==0) {
				primeLtoR.add((i+l+0l));
			}
		}
		return primeLtoR;
	}
}


import java.util.*;
public class ytt
{
    public static void main(String[]args)
    {
        Scanner sc=new Scanner(System.in);

      int t=sc.nextInt();int c=0;
        for(int i=1;i<=t;i++)
        {
          String s=sc.next();
          c=s.length();
            }
           System.out.println(c);        }}


import java.util.*;
public class ytt
{
    public static void main(String[]args)
    {
        Scanner sc=new Scanner(System.in);

      int t=sc.nextInt();int c=0;
        for(int i=1;i<=t;i++)
        {
          String s=sc.next();
          c=s.length();

           System.out.println(c);   }     }}


import java.math.BigInteger;
import java.util.*;

public class Main
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);

		Integer testCases= input.nextInt();

		while(testCases!=0)
		{
          BigInteger number = input.nextBigInteger();

          int digits = 0;

          while(true)
          {
              number = number.divide(BigInteger.valueOf(10));
              digits++;
              if(number.equals(BigInteger.valueOf(0)))
                break;
          }

          System.out.println(digits);

          testCases--;

		}

	}
}


import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {
    public static class FastIO {

        public static final int DEFAULT_BUFFER_SIZE = 65536;
        public static final int DEFAULT_INTEGER_SIZE = 11;
        public static final int DEFAULT_LONG_SIZE = 20;
        public static final int DEFAULT_WORD_SIZE = 256;
        public static final int DEFAULT_LINE_SIZE = 8192;
        public static final int EOF = -1;

        private final InputStream in;
        private final OutputStream out;

        private byte[] inBuffer;
        private int nextIn, inLength;
        private byte[] outBuffer;
        private int nextOut;

        private char[] charBuffer;
        private byte[] byteBuffer;

        public FastIO(InputStream in, OutputStream out, int inBufferSize, int outBufferSize) {
            this.in = in;
            this.inBuffer = new byte[inBufferSize];
            this.nextIn = 0;
            this.inLength = 0;

            this.out = out;
            this.outBuffer = new byte[outBufferSize];
            this.nextOut = 0;

            this.charBuffer = new char[DEFAULT_LINE_SIZE];
            this.byteBuffer = new byte[DEFAULT_LONG_SIZE];
        }

        public FastIO(InputStream in, OutputStream out) {
            this(in, out, DEFAULT_BUFFER_SIZE, DEFAULT_BUFFER_SIZE);
        }

        public FastIO(InputStream in, OutputStream out, int bufferSize) {
            this(in, out, bufferSize, bufferSize);
        }

        public char nextChar() {
            byte b;
            while (isSpace(b = read()))
                ;

            return (char) b;
        }

        public String next() {
            byte b;
            while (isSpace(b = read()))
                ;

            int pos = 0;
            do {
                charBuffer[pos++] = (char) b;
                ensureCapacity(pos);
            } while (!isSpace(b = read()));

            return new String(charBuffer, 0, pos);
        }

        public String nextLine() {
            byte b;
            int pos = 0;

            while (!isLine(b = read())) {
                charBuffer[pos++] = (char) b;
                ensureCapacity(pos);
            }

            return new String(charBuffer, 0, pos);
        }

        public int nextInt() {
            byte b;
            while (isSpace(b = read()))
                ;

            boolean negative = false;
            int result = b - '0';
            if (b == '-') {
                negative = true;
                result = 0;
            }

            while (isDigit(b = read()))
                result = (result * 10) + (b - '0');

            return negative ? -result : result;
        }

        public long nextLong() {
            byte b;
            while (isSpace(b = read()))
                ;

            boolean negative = false;
            long result = b - '0';
            if (b == '-') {
                negative = true;
                result = 0;
            }

            while (isDigit(b = read()))
                result = (result * 10) + (b - '0');

            return negative ? -result : result;
        }

        public float nextFloat() {
            byte b;
            while (isSpace(b = read()))
                ;

            int pos = 0;
            do {
                charBuffer[pos++] = (char) b;
            } while (!isSpace(b = read()));

            return Float.parseFloat(new String(charBuffer, 0, pos));
        }

        public float nextFloat2() {
            byte b;
            while (isSpace(b = read()))
                ;

            boolean negative = false;
            float result = b - '0';
            if (b == '-') {
                negative = true;
                result = 0;
            }

            while (isDigit(b = read()))
                result = (result * 10) + (b - '0');

            float d = 1;
            if (b == '.') {
                while (isDigit(b = read()))
                    result += (b - '0') / (d *= 10);
            }

            return negative ? -result : result;
        }

        public double nextDouble() {
            byte b;
            while (isSpace(b = read()))
                ;

            int pos = 0;
            do {
                charBuffer[pos++] = (char) b;
            } while (!isSpace(b = read()));

            return Double.parseDouble(new String(charBuffer, 0, pos));
        }

        public double nextDouble2() {
            byte b;
            while (isSpace(b = read()))
                ;

            boolean negative = false;
            double result = b - '0';
            if (b == '-') {
                negative = true;
                result = 0;
            }

            while (isDigit(b = read()))
                result = (result * 10) + (b - '0');

            double d = 1;
            if (b == '.') {
                while (isDigit(b = read()))
                    result += (b - '0') / (d *= 10);
            }

            return negative ? -result : result;
        }

        public BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        public BigDecimal nextBigDecimal() {
            return new BigDecimal(next());
        }

        public char[] nextToCharArray() {
            byte b;
            while (isSpace(b = read()))
                ;

            int pos = 0;
            do {
                charBuffer[pos++] = (char) b;
                ensureCapacity(pos);
            } while (!isSpace(b = read()));

            char[] array = new char[pos];
            System.arraycopy(charBuffer, 0, array, 0, pos);
            return array;
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = nextInt();

            return array;
        }

        public long[] nextLongArray(int size) {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
                array[i] = nextLong();

            return array;
        }

        public int[][] nextInt2DArray(int Y, int X) {
            int[][] array = new int[Y][X];
            for (int y = 0; y < Y; y++)
                for (int x = 0; x < X; x++)
                    array[y][x] = nextInt();

            return array;
        }

        public void print(char c) {
            write((byte) c);
        }

        public void print(char[] chars) {
            print(chars, 0, chars.length);
        }

        public void print(char[] chars, int start) {
            print(chars, start, chars.length);
        }

        public void print(char[] chars, int start, int end) {
            for (int i = start; i < end; i++)
                write((byte) chars[i]);
        }

        public void print(String s) {
            for (int i = 0; i < s.length(); i++)
                write((byte) s.charAt(i));
        }

        public void print(int i) {
            if (i == 0) {
                write((byte) '0');
                return;
            }
            if (i == Integer.MIN_VALUE) {
                write((byte) '-');
                write((byte) '2');
                write((byte) '1');
                write((byte) '4');
                write((byte) '7');
                write((byte) '4');
                write((byte) '8');
                write((byte) '3');
                write((byte) '6');
                write((byte) '4');
                write((byte) '8');
                return;
            }

            if (i < 0) {
                write((byte) '-');
                i = -i;
            }

            int pos = 0;
            while (i > 0) {
                byteBuffer[pos++] = (byte) ((i % 10) + '0');
                i /= 10;
            }

            while (pos-- > 0)
                write(byteBuffer[pos]);
        }

        public void print(long l) {
            if (l == 0) {
                write((byte) '0');
                return;
            }
            if (l == Long.MIN_VALUE) {
                write((byte) '-');
                write((byte) '9');
                write((byte) '2');
                write((byte) '2');
                write((byte) '3');
                write((byte) '3');
                write((byte) '7');
                write((byte) '2');
                write((byte) '0');
                write((byte) '3');
                write((byte) '6');
                write((byte) '8');
                write((byte) '5');
                write((byte) '4');
                write((byte) '7');
                write((byte) '7');
                write((byte) '5');
                write((byte) '8');
                write((byte) '0');
                write((byte) '8');
                return;
            }

            if (l < 0) {
                write((byte) '-');
                l = -l;
            }

            int pos = 0;
            while (l > 0) {
                byteBuffer[pos++] = (byte) ((l % 10) + '0');
                l /= 10;
            }

            while (pos-- > 0)
                write(byteBuffer[pos]);
        }

        public void print(float f) {
            String sf = Float.toString(f);
            for (int i = 0; i < sf.length(); i++)
                write((byte) sf.charAt(i));
        }

        public void print(double d) {
            String sd = Double.toString(d);
            for (int i = 0; i < sd.length(); i++)
                write((byte) sd.charAt(i));
        }

        public void printls(char c) {
            print(c);
            write((byte) ' ');
        }

        public void printls(String s) {
            print(s);
            write((byte) ' ');
        }

        public void printls(int i) {
            print(i);
            write((byte) ' ');
        }

        public void printls(long l) {
            print(l);
            write((byte) ' ');
        }

        public void printls(float f) {
            print(f);
            write((byte) ' ');
        }

        public void printls(double d) {
            print(d);
            write((byte) ' ');
        }

        public void printls() {
            write((byte) ' ');
        }

        public void println(char c) {
            print(c);
            write((byte) '\n');
        }

        public void println(char[] chars) {
            print(chars, 0, chars.length);
            write((byte) '\n');
        }

        public void println(String s) {
            print(s);
            write((byte) '\n');
        }

        public void println(int i) {
            print(i);
            write((byte) '\n');
        }

        public void println(long l) {
            print(l);
            write((byte) '\n');
        }

        public void println(float f) {
            print(f);
            write((byte) '\n');
        }

        public void println(double d) {
            print(d);
            write((byte) '\n');
        }

        public void println() {
            write((byte) '\n');
        }

        public void printf(String format, Object... args) {
            String s = String.format(format, args);
            for (int i = 0; i < s.length(); i++)
                write((byte) s.charAt(i));
        }

        public void fprint(char c) {
            print(c);
            flushBuffer();
        }

        public void fprint(String s) {
            print(s);
            flushBuffer();
        }

        public void fprint(int i) {
            print(i);
            flushBuffer();
        }

        public void fprint(long l) {
            print(l);
            flushBuffer();
        }

        public void fprint(float f) {
            print(f);
            flushBuffer();
        }

        public void fprint(double d) {
            print(d);
            flushBuffer();
        }

        public void fprintf(String format, Object... args) {
            printf(format, args);
            flushBuffer();
        }

        private byte read() {
            if (nextIn >= inLength) {
                if ((inLength = fill()) == EOF)
                    return EOF;
                nextIn = 0;
            }

            return inBuffer[nextIn++];
        }

        private void write(byte b) {
            if (nextOut >= outBuffer.length)
                flushBuffer();

            outBuffer[nextOut++] = b;
        }

        private int fill() {
            try {
                return in.read(inBuffer, 0, inBuffer.length);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }

        public void flush() {
            flushBuffer();
        }

        private void flushBuffer() {
            if (nextOut == 0)
                return;

            try {
                out.write(outBuffer, 0, nextOut);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }

            nextOut = 0;
        }

        public void close() {
            flush();
        }

        public void exit(char c) {
            fprint(c);
            System.exit(0);
        }

        public void exit(String s) {
            fprint(s);
            System.exit(0);
        }

        public void exit(int i) {
            fprint(i);
            System.exit(0);
        }

        public void exit(long l) {
            fprint(l);
            System.exit(0);
        }

        public void exit(float f) {
            fprint(f);
            System.exit(0);
        }

        public void exit(double d) {
            fprint(d);
            System.exit(0);
        }

        public void exit(String format, Object... args) {
            fprintf(format, args);
            System.exit(0);
        }

        public void exit() {
            flushBuffer();
            System.exit(0);
        }

        private void ensureCapacity(int size) {
            if (size < charBuffer.length)
                return;

            char[] array = new char[size * 2];
            System.arraycopy(charBuffer, 0, array, 0, size);
            charBuffer = array;
        }

        private boolean isDigit(byte b) {
            return b >= '0' && b <= '9';
        }

        private boolean isLine(byte b) {
            return b == '\n' || b == '\r' || b == EOF;
        }

        private boolean isSpace(byte b) {
            return b == ' ' || b == '\t' || b == '\n' || b == '\r' || b == '\f' || b == EOF;
        }
    }

    public static void main(String[] args) {
        FastIO ioio = new FastIO(System.in, System.out);
        int tc = ioio.nextInt();
        for (int tt = 0; tt < tc; tt++) {
            String s = ioio.nextLine();
            System.out.println(s.length());
        }
    }
}