Solution to the bats challenge problem.