input: def min_steps_to_capture_queen(x1: int, y1: int, x2: int, y2: int, qx: int, qy: int) -> int:
      """
      You have a 1-indexed 8x8 chessboard with 3 pieces placed on it.
  
      You are provided 6 integers x1, y1, x2, y2, qx, and qy where:
  
      (x1, y1) is the location of the white rook.
      (x2, y2) is the location of the white bishop.
      (qx, qy) is the location of the black queen.
  
      Considering only the movements of the white pieces, determine the minimum number of steps to capture the black queen.
  
      Notes:
  
      Rooks have the ability to move any number of squares vertically or horizontally, without leaping over other pieces.
      Bishops can travel any number of squares in diagonal lines, without leaping over other pieces.
      Both the rook and the bishop can capture the queen if she occupies a square they can legally move to.
      The queen remains stationary.
  
      Examples:
      >>> x1, y1, x2, y2, qx, qy = 1, 1, 8, 8, 2, 3
      2
      >>> x1, y1, x2, y2, qx, qy = 5, 3, 3, 4, 5, 2
      1
  
      Constraints:
      1 <= x1, y1, x2, y2, qx, qy <= 8
      All pieces are on distinct squares.
      """
output:     def min_steps_to_capture_queen(x1: int, y1: int, x2: int, y2: int, qx: int, qy: int) -> int:
      def rook_moves(rx, ry, qx, qy):
          if rx == qx or ry == qy:
              return 1
          return 2
  
      def bishop_moves(bx, by, qx, qy):
          if (bx + by == qx + qy) or (bx - by == qx - qy):
              return 1
          return 2 if (bx + by) % 2 == (qx + qy) % 2 else float('inf')
  
      rook_steps = rook_moves(x1, y1, qx, qy)
      bishop_steps = bishop_moves(x2, y2, qx, qy)
  
      return min(rook_steps, bishop_steps)