input: from typing import List, Union
  
  class MedianFinder:
      def __init__(self):
          """Initializes an empty list to store numbers."""
          self._data = []
      
      def add(self, num: Union[int, float]):
          """Adds a number to the list."""
          self._data.append(num)
      
      def find_median(self) -> float:
          """Finds the median of the list of numbers.
          >>> finder = MedianFinder()
          >>> finder.add(3)
          >>> finder.add(1)
          >>> finder.add(5)
          >>> finder.find_median()
          3.0
          """
          data = sorted(self._data)
          n = len(data)
          return (data[(n-1)//2] + data[n//2]) / 2
output:         data = sorted(self._data)
          n = len(data)
          if n % 2 == 1:
              return data[n//2]
          else:
              return (data[n//2 - 1] + data[n//2]) / 2