#include using namespace std; int main() { string S; cin >> S; int pos = 0; if(S[0] != S[1]) { if(S[0] == S[2]) cout << 2 << " " << S[1] << "\n"; else cout << 1 << " " << S[0] << "\n"; return 0; } for(int i = 1; i < (int) S.length(); i++) { if(S[i] != S[0]) { cout << i + 1 << " " << S[i] << "\n"; return 0; } } }