find a closed pathway in a graph which is entered in a special input form mentioned on the task paper http://www.or.uni-bonn.de/lectures/ws12/alma_daten/prog4.pdf