"""simple docstring"""




_a				:		Optional[Any]	   =       [
    [0, 16, 13, 0, 0, 0],
    [0, 0, 10, 12, 0, 0],
    [0, 4, 0, 0, 14, 0],
    [0, 0, 9, 0, 0, 20],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	Union[str, Any]      ,_lowerCamelCase						:	Tuple      ,_lowerCamelCase						:	Union[str, Any]      ,_lowerCamelCase						:	int     )	->				Optional[int]:
  # Return True if there is node that has not iterated.
  _lowerCAmelCase						:	Tuple        =					[False] * len(_lowerCamelCase     )
  _lowerCAmelCase						:	Union[str, Any]        =					[s]
  _lowerCAmelCase						:	Optional[Any]        =					True

  while queue:
    _lowerCAmelCase						:	Any        =					queue.pop(0     )
    for ind in range(len(graph[u]     )     ):
      if visited[ind] is False and graph[u][ind] > 0:
        queue.append(_lowerCamelCase     )
        _lowerCAmelCase						:	List[str]        =					True
        _lowerCAmelCase						:	List[Any]        =					u

  return visited[t]





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	List[Any]      ,_lowerCamelCase						:	Dict      ,_lowerCamelCase						:	Optional[Any]     )	->				Optional[int]:
  _lowerCAmelCase						:	List[str]        =					[-1] * (len(_lowerCamelCase     ))
  _lowerCAmelCase						:	Tuple        =					0
  _lowerCAmelCase						:	List[str]        =					[]
  _lowerCAmelCase						:	Optional[Any]        =					[i[:] for i in graph]  # Record original cut, copy.
  while bfs(_lowerCamelCase      ,_lowerCamelCase      ,_lowerCamelCase      ,_lowerCamelCase     ):
    _lowerCAmelCase						:	str        =					float("""Inf"""     )
    _lowerCAmelCase						:	Optional[Any]        =					sink

    while s != source:
      # Find the minimum value in select path
      _lowerCAmelCase						:	Union[str, Any]        =					min(_lowerCamelCase      ,graph[parent[s]][s]     )
      _lowerCAmelCase						:	Union[str, Any]        =					parent[s]

    max_flow += path_flow
    _lowerCAmelCase						:	Tuple        =					sink

    while v != source:
      _lowerCAmelCase						:	List[str]        =					parent[v]
      graph[u][v] -= path_flow
      graph[v][u] += path_flow
      _lowerCAmelCase						:	Optional[Any]        =					parent[v]

  for i in range(len(_lowerCamelCase     )     ):
    for j in range(len(graph[0]     )     ):
      if graph[i][j] == 0 and temp[i][j] > 0:
        res.append((i, j)     )

  return res


if __name__ == "__main__":
     print(mincut(test_graph, source=0, sink=5))





"""simple docstring"""




import math





def 							SCREAMING_SNAKE_CASE					(      )	->				None:
  _lowerCAmelCase						:	Any        =					input("""Enter message: """     )
  _lowerCAmelCase						:	List[Any]        =					int(input(f"Enter key [2-{len(_lowerCamelCase     ) - 1}]: "     )     )
  _lowerCAmelCase						:	Optional[Any]        =					input("""Encryption/Decryption [e/d]: """     )

  if mode.lower().startswith("""e"""     ):
    _lowerCAmelCase						:	Tuple        =					encrypt_message(_lowerCamelCase      ,_lowerCamelCase     )
  elif mode.lower().startswith("""d"""     ):
    _lowerCAmelCase						:	Dict        =					decrypt_message(_lowerCamelCase      ,_lowerCamelCase     )

  # Append pipe symbol (vertical bar) to identify spaces at the end.
  print(f"Output:\n{text + '|'}"     )





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int      ,_lowerCamelCase						:	str     )	->				str:
  _lowerCAmelCase						:	Dict        =					[""""""] * key
  for col in range(_lowerCamelCase     ):
    _lowerCAmelCase						:	List[str]        =					col
    while pointer < len(_lowerCamelCase     ):
      cipher_text[col] += message[pointer]
      pointer += key
  return "".join(_lowerCamelCase     )





def 							SCREAMING_SNAKE_CASE					(      _lowerCamelCase						:	int      ,_lowerCamelCase						:	str     )	->				str:
  _lowerCAmelCase						:	str        =					math.ceil(len(_lowerCamelCase     ) / key     )
  _lowerCAmelCase						:	Union[str, Any]        =					key
  _lowerCAmelCase						:	Any        =					(num_cols * num_rows) - len(_lowerCamelCase     )
  _lowerCAmelCase						:	Dict        =					[""""""] * num_cols
  _lowerCAmelCase						:	Optional[Any]        =					0
  _lowerCAmelCase						:	Dict        =					0

  for symbol in message:
    plain_text[col] += symbol
    col += 1

    if (
        (col == num_cols)
        or (col == num_cols - 1)
        and (row >= num_rows - num_shaded_boxes)
    ):
      _lowerCAmelCase						:	str        =					0
      row += 1

  return "".join(_lowerCamelCase     )


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()




