public class Solution {
    public static void main(String[] args) throws Exception {
        //write your code here
        HashMap<String, String> h = new HashMap<String, String>();
        h.put("watermelon" , "melon");
        h.put("banana" , "fruit");
        h.put("cherry" , "fruit");
        h.put("pear" , "fruit");
        h.put("cantaloupe" , "melon");
        h.put("blackberry" , "fruit");
        h.put("ginseng" , "root");
        h.put("strawberry" , "fruit");
        h.put("iris" , "flower");
        h.put("potato" , "tuber");

        for(HashMap.Entry<String, String> p : map.entrySet())
        {
            String key = p.getKey();                      // Key
            String value = p.getValue();                  // Value
            System.out.println(key + "-" + value);
        }

    }