#include<iostream>
#include <bits/stdc++.h>
#include<algorithm>
#include <cstring>
#include <string.h>
#define endl "\n"
#define SRK ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define EPS 1e-9
#define MAX 100000
#define caseno cout << "Case " << cas++ << ": ";
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1e9;
using namespace std;

int main()
{
    SRK;
    int t;
    cin >> t;
    while(t--)
    {
        string s;
        cin >> s;
        cout << s.length() << endl;
    }
}

