cyclic = [n for n, heads in num_heads.items() if heads]
return ordered, cyclic
if __name__ == '__main__':
    connections = [(3, 7), (6, 5), (4, 6), (5, 3), (7, 8), (1, 2), (2, 1)]
print(topological_sort(connections))
Как я могу заказать список подключений