since i was encouraged to break the rules, I'm going to claim this is a complete solution.
Rules state is must contain g()("al"), fixed that
Small tweak to comply with rule 7

did not g("al") must return "gal". Which it technically didn't do before.
Merge pull request #152 from lawl/master

Complete Java solution