#include

using namespace std;

```
int main(){
int t,in,tmp,a[100005],i,j=0,n,c,count;
cin>>t;
while(t--){
a[100005]={0}; //this is line 8
cin>>in;
n=0;
while(in!=0){
tmp=in%10;
a[j]=tmp;
j++;n++;
in/=10;
}
count=0;c=0;
for(i=0;i<n;i++){
if(a*!=c){
count++;
c=a*;
}
//if(a*==1)
//count++;
}
cout<<count+1<<endl;}
return 0;
```

}