/**
 * Given a list of animals and the number of generations, print the population of each animal after each generation.
 *
 * @param animals List of strings representing the names of animals.
 * @param generations Number of generations to simulate.
 */
fun printAnimalPopulation(animals: List<String>, generations: Int) {

    var population = IntArray(animals.size) { 1 }

    for (generation in 1..generations) {
        print("After generation $generation: ")
        for (i in animals.indices) {
            // Your code to complete the exercise goes here

        }
        println()
    }
}
/**
 * Given a list of animals and the number of generations, print the population of each animal after each generation.
 *
 * @param animals List of strings representing the names of animals.
 * @param generations Number of generations to simulate.
 */
fun printAnimalPopulation(animals: List<String>, generations: Int) {
/**
 * Given a list of animals and the number of generations, print the population of each animal after each generation.
 *
 * @param animals List of strings representing the names of animals.
 * @param generations Number of generations to simulate.
 */
fun printAnimalPopulation(animals: List<String>, generations: Int) {

    var population = IntArray(animals.size) { 1 }

    for (generation in 1..generations) {
        print("After generation $generation: ")
        for (i in animals.indices) {
            // Your code to complete the exercise goes here

        }
        println()
    }
}