
import heapq as hq
import math
from collections.abc import Iterator







class        lowercase	:




							def __init__(       self     ,A__):
												lowercase					=		str(id_)
												lowercase					=		None
												lowercase					=		None
												lowercase					=		[]
												lowercase					=		{}  # {vertex:distance}




							def __lt__(       self     ,A__):
												return self.key < other.key




							def __repr__(       self):
												return self.id




							def 				A__   (       self     ,A__):
												self.neighbors.append(A__)





							def 				A__   (       self     ,A__     ,A__):
												lowercase					=		weight



def  UpperCamelCase					(							lowerCAmelCase__				,    lowerCAmelCase__				,    lowerCAmelCase__				,    lowerCAmelCase__	):
					'''simple docstring'''
					# add the neighbors:
					graph[a - 1].add_neighbor(graph[b - 1]	)
					graph[b - 1].add_neighbor(graph[a - 1]	)
					# add the edges:
					graph[a - 1].add_edge(graph[b - 1]				,    lowerCAmelCase__	)
					graph[b - 1].add_edge(graph[a - 1]				,    lowerCAmelCase__	)



def  UpperCamelCase					(							lowerCAmelCase__				,    lowerCAmelCase__	):
					'''simple docstring'''
					lowercase					=		[]
					for u in graph:
										lowercase					=		math.inf
										lowercase					=		None
					lowercase					=		0
					lowercase					=		graph[:]
					while q:
										lowercase					=		min(lowerCAmelCase__	)
										q.remove(lowerCAmelCase__	)
										for v in u.neighbors:
															if (v in q) and (u.edges[v.id] < v.key):
																				lowercase					=		u
																				lowercase					=		u.edges[v.id]
					for i in range(1				,    len(lowerCAmelCase__	)	):
										a.append((int(graph[i].id	) + 1, int(graph[i].pi.id	) + 1)	)
					return a



def  UpperCamelCase					(							lowerCAmelCase__				,    lowerCAmelCase__	):
					'''simple docstring'''
					for u in graph:
										lowercase					=		math.inf
										lowercase					=		None
					lowercase					=		0

					lowercase					=		list(lowerCAmelCase__	)
					hq.heapify(lowerCAmelCase__	)

					while h:
										lowercase					=		hq.heappop(lowerCAmelCase__	)
										for v in u.neighbors:
															if (v in h) and (u.edges[v.id] < v.key):
																				lowercase					=		u
																				lowercase					=		u.edges[v.id]
																				hq.heapify(lowerCAmelCase__	)

					for i in range(1				,    len(lowerCAmelCase__	)	):
										yield (int(graph[i].id	) + 1, int(graph[i].pi.id	) + 1)



def  UpperCamelCase					(							):
					'''simple docstring'''


if __name__ == "__main__":
							import doctest

							doctest.testmod()






def  UpperCamelCase					(							lowerCAmelCase__ = 1000	):
					'''simple docstring'''
					lowercase					=		-1
					lowercase					=		0
					for a in range(1				,    n // 3	):
										# Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
										lowercase					=		(n * n - 2 * a * n) // (2 * n - 2 * a)
										lowercase					=		n - a - b
										if c * c == (a * a + b * b):
															lowercase					=		a * b * c
															if candidate >= product:
																				lowercase					=		candidate
					return product


if __name__ == "__main__":
							print(F'{solution() = }')




