


"""simple docstring"""







import random
import sys

__lowercase          = """ABCDEFGHIJKLMNOPQRSTUVWXYZ"""


def 	lowercase     (							)-> None:
  '''simple docstring'''







  a		:						str 				=     input("Enter message: "			)
  a		:						Dict 				=     "LFWOAYUISVKMNXPBDCRJTQEGHZ"
  a		:						int 				=     input("Encrypt/Decrypt [e/d]: "			)

  check_valid_key(A_			)

  if resp.lower().startswith("e"			):
    a		:						int 				=     "encrypt"
    a		:						Any 				=     encrypt_message(A_    ,  A_			)
  elif resp.lower().startswith("d"			):
    a		:						Any 				=     "decrypt"
    a		:						int 				=     decrypt_message(A_    ,  A_			)

  print(F'''\n{mode.title()}ion: \n{translated}'''			)


def 	lowercase     (							A_			)-> None:
  '''simple docstring'''







  a		:						str 				=     list(A_			)
  a		:						str 				=     list(A_			)
  key_list.sort()
  letters_list.sort()

  if key_list != letters_list:
    sys.exit("Error in the key or symbol set."			)


def 	lowercase     (							A_    ,  A_			)-> str:
  '''simple docstring'''







  return translate_message(A_    ,  A_    ,  "encrypt"			)


def 	lowercase     (							A_    ,  A_			)-> str:
  '''simple docstring'''







  return translate_message(A_    ,  A_    ,  "decrypt"			)


def 	lowercase     (							A_    ,  A_    ,  A_			)-> str:
  '''simple docstring'''







  a		:						Dict 				=     ""
  a		:						Dict 				=     LETTERS
  a		:						str 				=     key

  if mode == "decrypt":
    a				,						a		:						Union[str, Any] 				=     chars_b, chars_a

  for symbol in message:
    if symbol.upper() in chars_a:
      a		:						int 				=     chars_a.find(symbol.upper()			)
      if symbol.isupper():
        translated += chars_b[sym_index].upper()
      else:
        translated += chars_b[sym_index].lower()
    else:
      translated += symbol

  return translated


def 	lowercase     (							)-> str:
  '''simple docstring'''







  a		:						Dict 				=     list(A_			)
  random.shuffle(A_			)
  return "".join(A_			)


if __name__ == "__main__":
 main()










"""simple docstring"""







def 	lowercase     (							A_    ,  A_			)-> list[tuple[int, int, int]]:
  '''simple docstring'''







  a		:						Union[str, Any] 				=     sorted(A_    ,  key=lambda A_			: edge[2]			)

  a		:						List[Any] 				=     list(range(A_			)			)

  def find_parent(A_			):
    if i != parent[i]:
      a		:						Dict 				=     find_parent(parent[i]			)
    return parent[i]

  a		:						Optional[Any] 				=     0
  a		:						Optional[int] 				=     []

  for edge in edges:
    a		:						List[str] 				=     find_parent(edge[0]			)
    a		:						int 				=     find_parent(edge[1]			)
    if parent_a != parent_b:
      minimum_spanning_tree_cost += edge[2]
      minimum_spanning_tree.append(A_			)
      a		:						Tuple 				=     parent_b

  return minimum_spanning_tree


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

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

 kruskal(num_nodes, edges)






