detect and print cycle in undirected graph