'''simple docstring'''





from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
__snake_case			      =    9.8_0665





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  None:






      '''simple docstring'''





      if not isinstance(__lowerCAmelCase		,					(int, float)						):
            raise TypeError('''Invalid velocity. Should be a positive number.'''						)

      if not isinstance(__lowerCAmelCase		,					(int, float)						):
            raise TypeError('''Invalid angle. Range is 1-90 degrees.'''						)

      # Ensure valid angle
      if angle > 90 or angle < 1:
            raise ValueError('''Invalid angle. Range is 1-90 degrees.'''						)

      # Ensure valid velocity
      if init_velocity < 0:
            raise ValueError('''Invalid velocity. Should be a positive number.'''						)





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  float:






      '''simple docstring'''





      check_args(__lowerCAmelCase		,					__lowerCAmelCase						)
      UpperCAmelCase    : Union[str, Any]      =angle_to_radians(2 * angle						)
      return round(init_velocity**2 * sin(__lowerCAmelCase						) / g		,					2						)





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  float:






      '''simple docstring'''





      check_args(__lowerCAmelCase		,					__lowerCAmelCase						)
      UpperCAmelCase    : Any      =angle_to_radians(__lowerCAmelCase						)
      return round(init_velocity**2 * sin(__lowerCAmelCase						) ** 2 / (2 * g)		,					2						)





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  float:






      '''simple docstring'''





      check_args(__lowerCAmelCase		,					__lowerCAmelCase						)
      UpperCAmelCase    : str      =angle_to_radians(__lowerCAmelCase						)
      return round(2 * init_velocity * sin(__lowerCAmelCase						) / g		,					2						)





def   lowerCAmelCase_ (				)->  None:






      '''simple docstring'''





      UpperCAmelCase    : Optional[Any]      =25, 20
      assert horizontal_distance(__lowerCAmelCase		,					__lowerCAmelCase						) == 40.97
      assert max_height(__lowerCAmelCase		,					__lowerCAmelCase						) == 3.73
      assert total_time(__lowerCAmelCase		,					__lowerCAmelCase						) == 1.74


if __name__ == "__main__":
     from doctest import testmod

     testmod()

     # Get input from user
     __snake_case			      =    float(input('''Initial Velocity: ''').strip())

     # Get input from user
     __snake_case			      =    float(input('''angle: ''').strip())

     # Print results
     print()
     print('''Results: ''')
     print(f'Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]')
     print(f'Maximum Height: {max_height(init_vel, angle)!s} [m]')
     print(f'Total Time: {total_time(init_vel, angle)!s} [s]')

def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  list[tuple[int, int, int]]:






      '''simple docstring'''





      UpperCAmelCase    : List[Any]      =sorted(__lowerCAmelCase		,					key=lambda __lowerCAmelCase						: edge[2]						)

      UpperCAmelCase    : Union[str, Any]      =list(range(__lowerCAmelCase						)						)

      def find_parent(__lowerCAmelCase						):
            if i != parent[i]:
                  UpperCAmelCase    : Optional[int]      =find_parent(parent[i]						)
            return parent[i]

      UpperCAmelCase    : Optional[Any]      =0
      UpperCAmelCase    : List[str]      =[]

      for edge in edges:
            UpperCAmelCase    : Dict      =find_parent(edge[0]						)
            UpperCAmelCase    : Optional[Any]      =find_parent(edge[1]						)
            if parent_a != parent_b:
                  minimum_spanning_tree_cost += edge[2]
                  minimum_spanning_tree.append(__lowerCAmelCase						)
                  UpperCAmelCase    : Optional[Any]      =parent_b

      return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
     __snake_case      ,  __snake_case			      =    list(map(int, input().strip().split()))
     __snake_case			      =    []

     for _ in range(num_edges):
          __snake_case      ,  __snake_case      ,  __snake_case			      =    (int(x) for x in input().strip().split())
          edges.append((nodea, nodea, cost))

     kruskal(num_nodes, edges)
