SPOJ 12: The Game of Master-Mind