#include #include char s[500005]; int main(){ scanf("%s",s+1); int n = strlen(s+1); int cnt = 0; int find = -1; for(int i = 2; i <= n; i++){ if(s[i]!=s[1]){ if(find==-1) find = i; cnt++; } } if(cnt==n-1) printf("%d %c\n",1,s[1]); else printf("%d %c\n",find,s[find]); return 0; }