双指针
```
include [HTML_REMOVED]
using namespace std;
int main(){
int n;cin>>n;
string s;
while(n–){
int l=0;char a=’\0’;
int i=0;int j=0;
cin>>s;
for(i=0;i[HTML_REMOVED]l){l=j-i;a=s[i];}
i=j-1;
}
cout<<a<<” “<<l<<endl;
}
return 0;
}
```