



import math
import sys





def   __snake_case			(    _UpperCAmelCase       ):
    __a		 =       ''''''
    try:
        with open(_UpperCAmelCase     ,				'''rb'''       ) as binary_file:
            __a		 =       binary_file.read()
        for dat in data:
            __a		 =       f'{dat:08b}'
            result += curr_byte
        return result
    except OSError:
        print('''File not accessible'''       )
        sys.exit()





def   __snake_case			(    _UpperCAmelCase       ):
    __a		 =       {'''0''': '''0''', '''1''': '''1'''}
    __a ,     __a		 =       '''''', ''''''
    __a		 =       len(_UpperCAmelCase       )

    for i in range(len(_UpperCAmelCase       )       ):
        curr_string += data_bits[i]
        if curr_string not in lexicon:
            continue

        __a		 =       lexicon[curr_string]
        result += last_match_id
        __a		 =       last_match_id + '''0'''

        if math.loga(_UpperCAmelCase       ).is_integer():
            __a		 =       {}
            for curr_key in list(_UpperCAmelCase       ):
                __a		 =       lexicon.pop(_UpperCAmelCase       )
            __a		 =       new_lex

        __a		 =       last_match_id + '''1'''
        index += 1
        __a		 =       ''''''
    return result





def   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase       ):
    __a		 =       8
    try:
        with open(_UpperCAmelCase     ,				'''wb'''       ) as opened_file:
            __a		 =       [
                to_write[i : i + byte_length]
                for i in range(0     ,				len(_UpperCAmelCase       )     ,				_UpperCAmelCase       )
            ]

            if len(result_byte_array[-1]       ) % byte_length == 0:
                result_byte_array.append('''10000000'''       )
            else:
                result_byte_array[-1] += "1" + "0" * (
                    byte_length - len(result_byte_array[-1]       ) - 1
                )

            for elem in result_byte_array[:-1]:
                opened_file.write(int(_UpperCAmelCase     ,				2       ).to_bytes(1     ,				byteorder='''big'''       )       )
    except OSError:
        print('''File not accessible'''       )
        sys.exit()





def   __snake_case			(    _UpperCAmelCase       ):
    __a		 =       0
    for letter in data_bits:
        if letter == "1":
            break
        counter += 1

    __a		 =       data_bits[counter:]
    __a		 =       data_bits[counter + 1 :]
    return data_bits





def   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase       ):
    __a		 =       read_file_binary(_UpperCAmelCase       )
    __a		 =       remove_prefix(_UpperCAmelCase       )
    __a		 =       decompress_data(_UpperCAmelCase       )
    write_file_binary(_UpperCAmelCase     ,				_UpperCAmelCase       )


if __name__ == "__main__":
 compress(sys.argv[1], sys.argv[2])










__snake_case		:str   	=  [
    [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   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase       ):
    # Return True if there is node that has not iterated.
    __a		 =       [False] * len(_UpperCAmelCase       )
    __a		 =       [s]
    __a		 =       True

    while queue:
        __a		 =       queue.pop(0       )
        for ind in range(len(graph[u]       )       ):
            if visited[ind] is False and graph[u][ind] > 0:
                queue.append(_UpperCAmelCase       )
                __a		 =       True
                __a		 =       u

    return visited[t]





def   __snake_case			(    _UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase       ):
    __a		 =       [-1] * (len(_UpperCAmelCase       ))
    __a		 =       0
    __a		 =       []
    __a		 =       [i[:] for i in graph]  # Record original cut, copy.
    while bfs(_UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase     ,				_UpperCAmelCase       ):
        __a		 =       float('''Inf'''       )
        __a		 =       sink

        while s != source:
            # Find the minimum value in select path
            __a		 =       min(_UpperCAmelCase     ,				graph[parent[s]][s]       )
            __a		 =       parent[s]

        max_flow += path_flow
        __a		 =       sink

        while v != source:
            __a		 =       parent[v]
            graph[u][v] -= path_flow
            graph[v][u] += path_flow
            __a		 =       parent[v]

    for i in range(len(_UpperCAmelCase       )       ):
        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))





