#include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S; S.reserve(500000), cin >> S; if (S[0] != S[1]) { if (S[0] == S[2]) cout << "2 " << S[1] << '\n'; else cout << "1 " << S[0] << '\n'; } else for (uint32_t i = 2; i != S.size(); ++i) if (S[i] != S[0]) { cout << i + 1 << ' ' << S[i] << '\n'; return 0; } return 0; }