A program which split the linked list into three parts