#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
using namespace std;
int dp[110][2];
char str[110];
int main()
{
// freopen("in","r",stdin);
// freopen("out","w",stdout);
int t,i,len;
scanf("%d",&t);
while(t--)
{
memset(dp,0,sizeof(dp));
scanf("%s",str);
len=strlen(str);
if(str[0]<='Z')
dp[0][0]=dp[0][1]=2;
else{
dp[0][0]=1;
dp[0][......
阅读全文