
// Created by aadi

// "Never give up", Miracles never happen in real life.

#include<bits/stdc++.h>
using namespace std ;
#define FAST  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define int long long int
#define MIN LLONG_MIN
#define MAX LLONG_MAX
#define set1D(a,val,n) { for(int i=0;i<n;i++) a[i]=val; }
#define set2D(a,val,n,m) { for(int i=0;i<n;i++) for(int j=0;j<m;j++)a[i][j]=val; }
const double pi = 3.14159265358979323846;
#define endl "\n"
#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<","<<#z<<"="<<z<<'\n'
#define all(x) x.begin(),x.end()


int32_t main() {
	//code;
	FAST
	int tt;
	cin >> tt;
	while (tt--) {
		//write code
		string n;
		cin >> n;
		cout << n.length() << endl;
	}
	return 0;
}