/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		 NavigableMap<String,String> m = new TreeMap(
		 	new Comparator<String>() {
		 		public int compare(String s1, String s2) {
		 			if (s1 == null && s2 == null) return 0;
		 			if (s1 != null && s2 != null) {
		 				return String.CASE_INSENSITIVE_ORDER.compare(s1, s2);
		 			}
		 			return s1 == null ? -1 : 1;
		 		}
		 	}
		 );
		 m.put("hello", "world");
		 m.put("foo", "bar");
		 m.put(null, "good!");
		 System.out.println(m.get(null));
		 System.out.println(m.get("hello"));
		 System.out.println(m.get("foo"));
	}
}