#include <bits/stdc++.h>

# define ll long long
# define ld double
# define fr first
# define sc second
# define pb push_back
# define pob pop_back
# define pf push_front
# define pof pop_front

const ll N = 1e6 + 10;
const ll INF = 1e18;
const ll inf = -1e18;
const ll MOD = 1e9 + 7;
const ll xesh = 31;

using namespace std;

ll n, i, a[1111], q, w, z, s;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
    string s;
    cin >> n;
    for(i = 1; i <= n; ++i)
    {
        cin >> s;
        cout << s.size() << '\n';
    }
}
