input: Write a function to extract the nth element from a 2D array.
  assert extract_nth_element([[1,2,3], [4,5,6], [7,8,9]], 5) == 6
  assert extract_nth_element([[10,20,30], [40,50,60], [70,80,90]], 8) == 90
  assert extract_nth_element([[1,1,1], [1,1,1], [1,1,1]], 4) == 1
output: def extract_nth_element(arr, n):
      flat_list = [element for sublist in arr for element in sublist]
      return flat_list[n]