from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase      		=					logging.get_logger(__name__)

UpperCAmelCase      		=					{
    '''openbmb/cpm-ant-10b''': '''https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json'''
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}




class  __lowerCAmelCase	(							a_    ):



 '''simple docstring'''
 _lowerCamelCase    :						Any					     =			'cpmant'

 def __init__(      self							:		List[Any]							,      lowerCamelCase							:		int = 3_0_7_2_0							,      lowerCamelCase							:		int = 4_0_9_6							,      lowerCamelCase							:		int = 3_2							,      lowerCamelCase							:		int = 1_2_8							,      lowerCamelCase							:		int = 1_0_2_4_0							,      lowerCamelCase							:		int = 4_8							,      lowerCamelCase							:		int = 0.0							,      lowerCamelCase							:		int = 5_1_2							,      lowerCamelCase							:		int = 2_0_4_8							,      lowerCamelCase							:		int = 1e-6							,      lowerCamelCase							:		float = 1.0							,      lowerCamelCase							:		int = 3_2							,      lowerCamelCase							:		int = 3_2							,      lowerCamelCase							:		int = 3_2							,      lowerCamelCase							:		bool = True							,      **lowerCamelCase							:		int							,      )			->				Dict:
        super().__init__(**lowerCamelCase	)
        _UpperCamelCase  :							Union[str, Any]	    =	prompt_types
        _UpperCamelCase  :							Optional[Any]	    =	prompt_length
        _UpperCamelCase  :							Optional[int]	    =	segment_types
        _UpperCamelCase  :							List[str]	    =	hidden_size
        _UpperCamelCase  :							List[str]	    =	num_attention_heads
        _UpperCamelCase  :							str	    =	dim_head
        _UpperCamelCase  :							Optional[int]	    =	dim_ff
        _UpperCamelCase  :							List[str]	    =	num_hidden_layers
        _UpperCamelCase  :							List[Any]	    =	position_bias_num_buckets
        _UpperCamelCase  :							Optional[Any]	    =	position_bias_max_distance
        _UpperCamelCase  :							Dict	    =	dropout_p
        _UpperCamelCase  :							int	    =	eps
        _UpperCamelCase  :							List[str]	    =	use_cache
        _UpperCamelCase  :							List[Any]	    =	vocab_size
        _UpperCamelCase  :							int	    =	init_std





"""simple docstring"""







def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	__lowerCAmelCase     :		Any		     = sorted(_UpperCamelCase			,    key=lambda _UpperCamelCase						: edge[2]						)

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

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

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

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

	return minimum_spanning_tree


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

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

							kruskal(num_nodes, edges)