#include using namespace std; int main() { string S; cin >> S; int N = S.size(); if( S[0] == S[1] && S[1] == S[2] ) { for( int i = 3; i < N; i++ ) { if( S[i] == S[0] ) continue; cout << i + 1 << " " << S[i] << endl; } } else { if( S[0] == S[1] ) cout << 3 << " " << S[2] << endl; else if( S[1] == S[2] ) cout << 1 << " " << S[0] << endl; else if( S[3] == S[0] ) cout << 2 << " " << S[1] << endl; } }