Samsung Electronics interview question

Print the loop nodes in a directed cyclic graph?