#include <vector>
#include <iostream>
#include <map>
#include <deque>
#include <algorithm>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <stack>

using namespace std;

int genRow(int n, int x, int y){
    int currY = y;
    int currX = x;
    cout << currX << " " << currY << endl;

    for(currX = 1; currX <= n; currX++)
        if(currX != x)
            cout << currX << " " << currY << endl;
    if(x == n)
        return n - 1;
    else
        return n;
}

int main(int argc, char ** argv) {
    int q;
    cin >> q;

    for(int qq = 0; qq < q; qq++) {
        string n;
        cin >> n;
        cout << n.size() << endl;
    }
}





















































































































































