#include<bits/stdc++.h>
#include<string>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)

int main()
{
    fastio;
    string s;
    int t,n;
    cin>>t;
    while(t--)
    {
        cin>>s;
        n=s.size();
        cout<<n<<"\n";
    }
    return 0;
}
