input: def capture_black_queen_min_moves(a: int, b: int, c: int, d: int, e: int, f: int) -> int:
      """
      On a standard 8x8 chessboard, initially set with three pieces placed at distinct positions as described below:
  
      You have the following integers representing the positions:
  
      (a, b) indicates the location of the white rook.
      (c, d) indicates the location of the white bishop.
      (e, f) indicates the location of the black queen.
  
      Calculate the fewest number of moves required for either of the white pieces to capture the queen, considering only their typical movement abilities. 
  
      Note:
  
      Rooks can travel any distance vertically or horizontally, without leaping over other pieces.
      Bishops can travel any distance diagonally, without leaping over other pieces.
      A rook or a bishop captures the queen by landing on her square.
      The queen is stationary.
  
      Examples:
      >>> a = 1, b = 1, c = 8, d = 8, e = 2, f = 3
      2
      >>> a = 5, b = 3, c = 3, d = 4, e = 5, f = 2
      1
  
      Constraints:
      1 <= a, b, c, d, e, f <= 8
      Each piece occupies a unique position on the board.
      """
output:     
      # Check if the rook can capture the queen in one move
      def rook_moves_to_capture(a, b, e, f):
          return 0 if (a == e and b == f) else 1 if (a == e or b == f) else 2
  
      # Check if the bishop can capture the queen in one move
      def bishop_moves_to_capture(c, d, e, f):
          return 0 if (c == e and d == f) else 1 if (abs(c - e) == abs(d - f)) else 2
  
      # Get the minimum moves for each piece to capture
      rook_moves = rook_moves_to_capture(a, b, e, f)
      bishop_moves = bishop_moves_to_capture(c, d, e, f)
  
      # Return the minimal number of moves needed to capture the queen
      return min(rook_moves, bishop_moves)
  