#include <iostream>
#include <cmath>
#include <bits/stdc++.h>
#include <string>
#include <sstream>
using ll = long long;
#define endl "\n"
#define For(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define pf push_front
#define mp make_pair
#define fe first
#define se second
const ll M = 1e9 + 7;
using namespace std;
bool isprime(ll x){
    if(x==1)
        return false;
    if(x==2)
        return true;
    if(x%2==0)
        return false;
    ll tem=1;
    for(ll i=2;(i*i)<=x;i++){
        if(x%i==0){
            tem=0;
            break;
        }
    }
    if(tem==0)
        return false;
    else
        return true;
}
struct node{
    int data;
    node* next;
    node(int x){
        data=x;
        next=NULL;
    }
};
node* insertend(node*head,int x){
    node*temp=new node(x);
    if(head==NULL){
        return temp;
    }
    node*c=head;
    while(c->next==NULL){
        c=c->next;
    }
    c->next=temp;
    return head;
}
int main() {
    ll  n,a, x, b,x1, x2, y1, y2, t,c,k, d, e, c1, c2;
    map<long long int, long long int> mp, pm;
    set<int> l;
    set<int>::iterator it1;

    vector<int> z{2,3,5,7};
    pair<int, int> p;
    vector<int> f;
    string s, mo, po;
    cin>>t;
    while(t--){
        cin>>s;
        cout<<s.length()<<endl;

    }
    return 0;
}