include[HTML_REMOVED]
using namespace std;
int main()
{
int n;
cin>>n;
while(n–)
{
string s;
cin>>s;
int m=0;
char c;
for(int i=0;i[HTML_REMOVED]m)
{m=j-i;
c=s[i];}
i=j-1;**
}
cout<<c<<’ ‘<<m<<endl;
}
return 0;
}