using System.Collections.Generic; using System; public class Hello { static void Main() { var s = Console.ReadLine().Trim(); getAns(s); } static void getAns(string s) { var d = new Dictionary(); for (int i = 0; i < s.Length; i++) { if (d.ContainsKey(s[i])) d[s[i]]++; else d[s[i]] = 1; } foreach(var x in d) { if (x.Value == 1) { Console.WriteLine("{0} {1}",s.IndexOf(x.Key) + 1,x.Key); return; } } } }