import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class StringTokenizerTest {

    public static void main(String args[]) {
        TreeMap<String, Integer> m = 
            new TreeMap<String, Integer>();
        try {
            BufferedReader reader = new BufferedReader(
                new FileReader("properties.txt")
            );
            String line = reader.readLine();
            while (line != null && !line.equals("")) {
                StringTokenizer tokenizer = 
                    new StringTokenizer(line, " :;");
                while (tokenizer.hasMoreTokens()) {
                    String key = tokenizer.nextToken();
                    int value = Integer.parseInt(
                        tokenizer.nextToken());
                    m.put(key, new Integer(value));
                }
                line = reader.readLine();
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        Iterator i = m.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry<String, Double> e = 
              (Map.Entry<String, Double>) i.next();
            System.out.println(
                e.getKey() + ":  " + e.getValue());
        }
    }
}
