#include<bits/stdc++.h>
using namespace std;
#define RED_BULL ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define ll long long int
#define all(a) (a.begin(),a.end())
#define fora(i,N) for(int i=1;i<=N;i++)
const ll MOD = 1e9 + 7;
ll add(ll x, ll y) {ll res = x + y; return (res >= MOD ? res - MOD : res);}
ll mul(ll x, ll y) {ll res = x * y; return (res >= MOD ? res % MOD : res);}
ll power(ll x, ll y) {ll res = 1; x %= MOD; while (y) {if (y & 1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}
void findAns()
{
    string s;
    cin >> s;

    cout << s.size() << "\n";


}
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    RED_BULL;

    //sieve();
    ll  t = 1;

    cin >> t;

    for (int i = 1; i <= t; i++) findAns();

    return 0;

}
