using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var s = ReadLine(); for (var i = 0; i < s.Length; ++i) { var prev = (i - 1 + s.Length) % s.Length; var next = (i + 1) % s.Length; if (s[i] != s[prev] && s[i] != s[next]) { WriteLine($"{i + 1} {s[i]}"); return; } } } }