/* 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
{
{
new Comparator<String>() {
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")); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCSBOYXZpZ2FibGVNYXA8U3RyaW5nLFN0cmluZz4gbSA9IG5ldyBUcmVlTWFwKAoJCSAJbmV3IENvbXBhcmF0b3I8U3RyaW5nPigpIHsKCQkgCQlwdWJsaWMgaW50IGNvbXBhcmUoU3RyaW5nIHMxLCBTdHJpbmcgczIpIHsKCQkgCQkJaWYgKHMxID09IG51bGwgJiYgczIgPT0gbnVsbCkgcmV0dXJuIDA7CgkJIAkJCWlmIChzMSAhPSBudWxsICYmIHMyICE9IG51bGwpIHsKCQkgCQkJCXJldHVybiBTdHJpbmcuQ0FTRV9JTlNFTlNJVElWRV9PUkRFUi5jb21wYXJlKHMxLCBzMik7CgkJIAkJCX0KCQkgCQkJcmV0dXJuIHMxID09IG51bGwgPyAtMSA6IDE7CgkJIAkJfQoJCSAJfQo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