solve problem 122, got 'Accepted 187ms	1827kb'
 - delete function find_visited_child, move it to fuction main.