Template for contest (Java)