public static void main(String[] args) {
        ST<String, Integer> st = new ST<String, Integer>();
        Scanner scanner = new Scanner (new BufferedInputStream(System.in));
        for (int i = 0; scanner.hasNext(); i++) {
            String key = scanner.next();
            st.put(key, i);
        }
        for (String s : st.keys())
            System.out.println(s + " " + st.get(s));
        
        
    }