#include <algorithm>
#include <map>
#include <string>
#include <iostream>
#include <vector>
#include <cmath>
//#include <bits/stdc++.h>
#include<queue>
#include <iomanip>
#include <climits>
#include <cstring>
#include <unordered_map>
using namespace std;
#define ff      first
#define ss      second
#define int     long long
#define pb      push_back
#define mp      make_pair
#define pii     pair<int,int>
#define vi      vector<int>
#define mii     map<int,int>
#define umii    unordered_map<int,int>
#define pqg     priority_queue<int>
#define pqs     priority_queue<int,vi,greater<int>>
#define mod     1000000007
#define w(x)    int x; cin>>x; while(x--)
#define FOR(a, b) for(int i=a;i<b;i++)
#define rep(a, b) for(int i=a;i<=b;i++)


string n;

int32_t main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
if (fopen("../input.txt", "r"))
{
    freopen("../input.txt", "r", stdin);
    freopen("../output.txt", "w", stdout);
}
#endif
     w(t) {
        cin >> n;
        cout << n.size() << "\n";
     }
}