/* 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
{
{
List<String> g = new ArrayList<String>();
g.add("glove");
g.add("golve");
g.add("gvloe");
g.add("gevlo");
// Before sorting (Natural order)
}
System.
out.
println("\n----------");
// After sorting (Natural order)
}
// Convert it to array
// Check if the array has the correct sort order?
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUxpc3Q8U3RyaW5nPiBnID0gbmV3IEFycmF5TGlzdDxTdHJpbmc+KCk7CgkJZy5hZGQoImdsb3ZlIik7CgkJZy5hZGQoImdvbHZlIik7CgkJZy5hZGQoImd2bG9lIik7CgkJZy5hZGQoImdldmxvIik7CgkJCgkJLy8gQmVmb3JlIHNvcnRpbmcgKE5hdHVyYWwgb3JkZXIpCgkJZm9yKFN0cmluZyBzOiBnKXsKCQkJCgkJCVN5c3RlbS5vdXQucHJpbnRsbihzKTsKCQl9CgkJCgkJU3lzdGVtLm91dC5wcmludGxuKCJcbi0tLS0tLS0tLS0iKTsKCQlDb2xsZWN0aW9ucy5zb3J0KGcpOwoJCQoJCS8vIEFmdGVyIHNvcnRpbmcgKE5hdHVyYWwgb3JkZXIpCgkJZm9yKFN0cmluZyBzOiBnKXsKCQkJCgkJCVN5c3RlbS5vdXQucHJpbnRsbihzKTsKCQl9CgkJCgkJCgkJU3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