import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); char[] s = sc.next().toCharArray(); sc.close(); Map map = new HashMap<>(); for (char c : s) { map.put(c, map.getOrDefault(c, 0) + 1); } for (int i = 0; i < s.length; i++) { if (map.get(s[i]) == 1) { System.out.println(i + 1 + " " + s[i]); } } } }