input: from typing import List
  from math import inf
  from heapq import nlargest, nsmallest
  
  def minimize_max_distance(points: List[List[int]]) -> int:
      """
      Given an array of integer coordinates representing points on a 2D plane (points[i] = [x_i, y_i]), calculate the minimum possible value for the maximum Manhattan distance between any two points by removing one point.
  
      Examples:
      >>> points = [[3, 10], [5, 15], [10, 2], [4, 4]]
      12
      >>> points = [[1, 1], [1, 1], [1, 1]]
      0
  
      Constraints:
      3 <= points.length <= 10^5
      points[i].length == 2
      1 <= points[i][0], points[i][1] <= 10^8
      """
output:     
      x_sorted = sorted(points, key=lambda p: p[0])
      y_sorted = sorted(points, key=lambda p: p[1])
  
      def calc_max_dist(pts):
          x_min_2 = nsmallest(2, pts, key=lambda p: p[0])
          x_max_2 = nlargest(2, pts, key=lambda p: p[0])
          y_min_2 = nsmallest(2, pts, key=lambda p: p[1])
          y_max_2 = nlargest(2, pts, key=lambda p: p[1])
  
          d1 = abs(x_max_2[0][0] - x_min_2[0][0]) + abs(x_max_2[0][1] - x_min_2[0][1])
          d2 = abs(x_max_2[1][0] - x_min_2[0][0]) + abs(x_max_2[1][1] - x_min_2[0][1])
          d3 = abs(x_max_2[0][0] - x_min_2[1][0]) + abs(x_max_2[0][1] - x_min_2[1][1])
          d4 = abs(x_max_2[1][0] - x_min_2[1][0]) + abs(x_max_2[1][1] - x_min_2[1][1])
          
          d5 = abs(y_max_2[0][0] - y_min_2[0][0]) + abs(y_max_2[0][1] - y_min_2[0][1])
          d6 = abs(y_max_2[1][0] - y_min_2[0][0]) + abs(y_max_2[1][1] - y_min_2[0][1])
          d7 = abs(y_max_2[0][0] - y_min_2[1][0]) + abs(y_max_2[0][1] - y_min_2[1][1])
          d8 = abs(y_max_2[1][0] - y_min_2[1][0]) + abs(y_max_2[1][1] - y_min_2[1][1])
  
          return max(d1, d2, d3, d4, d5, d6, d7, d8)
  
      return min(calc_max_dist(x_sorted), calc_max_dist(y_sorted))
  