import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner entry = new Scanner(System.in);
        int inputs = entry.nextInt();
        String[] strings = new String[inputs];
        for (int i = 0; i < strings.length; i++) {
            strings[i] = entry.nextLine();
        }
        int x = 0;
        for (String s : strings) {
            x++;
            System.out.print("Input #" + x + ": ");
            Boolean found = false;
            String[] split = s.split("");
            String string = "";
            for (int i = 0; i < split.length; i++) {
                if (string.contains(split[i])) {
                    System.out.print(split[i] + " found at indexes " + string.indexOf(split[i]) + " and " + i + "\n");
                    found = true;
                    break;
                } else {
                    string += split[i];
                }
            }
            if (!found) {
                System.out.print("No recurring character found.\n");
            }
        }
    }
}