in the process, change to two direction link table
recursive version, but can not run
wrong answer, but pass case 2
print middle value info