#include <bits/stdc++.h> 
#define pb push_back
#define mp make_pair 
#define fr first
#define sc second
#define MOD 1000000007
#define len(x) x.size()
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define all(v) v.begin(), v.end()
#define alla(a,n) a, a + n
#define f(i, n) for (int i = 0; i < int(n); i++)
#define g(i, n) for (int i = 0; i < int(n-1); i++)
#define fj(j, n) for (int j = 0; j < int(n); j++)
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)

using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;
typedef vector<vll> vvll;
typedef vector<string> vs;

// Driver function to sort the vector elements by 
// second element of pair in descending order 
bool sortbysecdesc(const pair<int,int> &a, 
                   const pair<int,int> &b) 
{ 
       return a.second>b.second; 
} 

// Driver function to sort the vector elements by  
// first element of pair in descending order 
bool sortinrev(const pair<int,int> &a,  
               const pair<int,int> &b) 
{ 
       return (a.first > b.first); 
}

// Function to return gcd of a and b 
ll gcd(ll a, ll b) 
{ 
    if (a == 0) 
        return b; 
    return gcd(b % a, a); 
} 

//Function to return lcm of a and b
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}

// Function to find gcd of array of 
// numbers 
int findGCD(ll a[], ll n) 
{ 
    int result = a[0]; 
    for (int i = 1; i < n; i++) 
    { 
        result = gcd(a[i], result); 
  
        if(result == 1) 
        { 
           return 1; 
        } 
    } 
    return result; 
}

int32_t main() {
    fio;

    int t ;
    cin >> t ;

    while( t-- ) {
        string s;
        cin>>s;
        cout<<s.length()<<endl;
        
        

    }

    return 0 ;

}