#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rem 1000000007
#define rem1 998244353 

int main()
{
	ll t;
	cin>>t;
	while(t--)
	{
		ll i,j,k,n,m;
		
		string str;
		cin>>str;
		
		cout<<str.length()<<"\n";
		
		
		
		
		
		
		
		
		
		
		
		
	}
}