import java.util.HashMap;
import java.util.TreeMap;
class Main {
public static void main(String[] args) {
// create a treemap
TreeMap<String, Integer> map = new TreeMap<>();
map.put("Dog",1);
map.put("Wolf",2);
System.out.println("TreeMap: " + map+"
");
// create hashmap from the treemap
HashMap<String, Integer> map1 = new HashMap<>(map);
map1.put("Leopard",3);
System.out.println("HashMap: " + map1);
}
}