Ninety nine solutions in Java