
//@alok__10
#include <bits/stdc++.h>
using namespace std;
#define fastio      ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
#define MOD         1000000007
#define pie         3.141592653
#define ll          long long
#define lli         long long int
#define ulli        unsigned long long int
#define ull         unsigned long long
#define vi          vector<int>
#define vvi         vector<vi>
#define vlli        vector<lli>
#define vll         vector<ll>
#define pb          push_back
#define unset       unordered_set
#define unmap       unordered_map
#define loop(i,n)   for(int i=0;i<n;i++)
#define clr(a,x)    memset(a,x,sizeof(a))
#define all(a)      a.begin(),a.end()
#define mp          make_pair
#define u_b         upper_bound
#define l_b         lower_bound
#define b_s         binary_search
#define test(t)     int t; cin>>t; while(t--)
#define gtest(t)    int t; cin>>t; for(int q=0;q<t;q++)
#define gkick       cout << "Case #" << q+1 << ": ";
// -----------------------------------------------------------------------------------
void inputoutput() {
    fastio
#ifndef ONLINE_JUDGE
    freopen("tin.txt", "r", stdin);
    freopen("tout.txt", "w", stdout);
#endif
}
void timelap() {
#ifndef ONLINE_JUDGE
    cout << "\n\nTime lap: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n";
#endif
}
bool prime(ll a) {
    if (a <= 1) return 0;
    if (a == 2 || a == 3) return 1;
    if (a % 2 == 0 || a % 3 == 0) return 0;
    for (int i = 5; i <= sqrt(a); i += 6)
        if (a % i == 0 || a % (i + 2) == 0)return 0;
    return 1;
}
// comparator to sort vector of pairs in decending order of the first element
// if 2 elements are equal than the smaller second element gets the priority
bool cmp(pair<ll, ll>& p1, pair<ll, ll>& p2) {
    if (p1.first < p2.first)return 0;
    if (p1.first == p2.first)
        if (p1.second > p2.second)return 0;
    return 1;
}
// BINARY EXPONENTIATION(WITH MOD=1000000007)
long long binpow(long long a, long long b) {
    a %= MOD;
    long long res = 1;
    while (b) {
        if (b & 1) res = res * a % MOD;
        a = (a * a) % MOD;
        b >>= 1;
    }
    return res;
}
// is sorted or not (for array)
bool sorted(vll v) {
    loop(i, v.size() - 1) if (v[i] > v[i + 1]) return 0;
    return 1;
}
ll kadanesalgo(vll v) {
    ll sum = 0, mn = 0, res = -1000000007;
    loop(i, v.size()) {
        sum += v[i];
        res = max(res, sum - mn);
        mn = min(mn, sum);
    }
    return res;
}
// vll result;
// void primeFactors(int n) {
//     while (n % 2 == 0) {
//         result.pb(2);
//         n = n / 2;
//     }

//     for (int i = 3; i <= sqrt(n); i = i + 2) {
//         while (n % i == 0) {
//             result.pb(i);
//             n = n / i;
//         }
//     }
//     if (n > 2)
//         result.pb(n);
// }
//solution goes below
// -----------------------------------------------------------------------------------------------------------------------------------

int main() {
    inputoutput();












    test(t) {
        string s;
        cin >> s;
        cout << s.length() << endl;
    }































    timelap();
    return 0;
}
//-----------------------------------------------------------------------------------------------------------------------------









