import java.util.*; public class Tribune { private static final Scanner sc = new Scanner(System.in); public static void main(String[] args) { try{ while(sc.hasNextLine()){ Map map = new HashMap<>(); int n = sc.nextInt(); char[][] ch = new char[n][n]; for(int i = 0; i < n;i++){ String rada = sc.next(); for(int j = 0; j < n;j++){ char c = rada.charAt(j); ch[i][j] = c; if(map.containsKey(c)){ int pocet = map.get(c); map.replace(c, pocet+1); }else{ map.put(c, 1); } } } char spatny = '*'; char dobry = '*'; for(char c : map.keySet()){ if(map.get(c) == 1){ spatny = c; } if(map.get(c) == (n-1)){ dobry = c; } } for(int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if(ch[i][j] == spatny){ System.out.println((i+1) + " " + (j+1) + " " + dobry); break; } } } } } catch (NullPointerException e){ } } }