Ball Game |2| ~~~~~~~~~~~~~ A group of :math:`N` children decides to play a ball game. Here are the rules: - Each child gets a number from :math:`1` to :math:`N` and these numbers are put in a list randomly. - The first child in the list has the ball at the beginning of the game. - Let’s say that this child got the ball with number :math:`k`. Then he/she must throw the ball to the child who is in :math:`k^{th}` place in the list. - For a given number of turns, the game continues like this. As the children don’t know about programming, they don’t have a clue about zero-based indexing applied in Python (like in almost every programming language). In other words, they don’t know that the indices of the elements in a Python list varies between :math:`0` and :math:`(N-1)` instead of between :math:`1` and :math:`N`. Write a function named *ball_game* which takes two arguments. The first argument is the shuffled list of children’s numbers as a *list of integers*, where the second one is the number of turns as an *integer*. This function must return an *integer* as the number of child who has the ball when the game is over. Note that if the ball is thrown to the child with number :math:`N`, the function should terminate the game early without giving any error. .. container:: sampleio Sample I/O: .. |2| image:: ../../figures/difficulty_four.png :class: difficulty .. code:: default >>> ball_game([1, 3, 2], 1) 1 >>> ball_game([1, 3, 2], 2) 3 >>> ball_game([1, 3, 2], 3) 3 >>> ball_game([3, 4, 5, 1, 2], 4) 2 >>> ball_game([3, 4, 5, 1, 2], 5) 5 >>> ball_game([3, 4, 5, 1, 2], 6) 5 >>> ball_game([8, 7, 1, 5, 3, 10, 4, 2, 6, 9], 4) 3 >>> ball_game([8, 7, 1, 5, 3, 10, 4, 2, 6, 9], 5) 5 >>> ball_game([8, 7, 1, 5, 3, 10, 4, 2, 6, 9], 6) 10 >>> ball_game([8, 7, 1, 5, 3, 10, 4, 2, 6, 9], 7) 10 .. raw:: html .. raw:: html