Java code for the baseline solutions for the CPROD1 contest