#include <iostream>
#include <bits/stdc++.h>
#define pb push_back
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //ifstream cin("C:/Users/zoran/Desktop/drvo.txt");
    int t;
    cin>>t;
    while(t--)
    {
        string s;
        cin>>s;
        cout<<s.size()<<"\n";

    }
    return 0;
}