Create linkedlist

linked list prgm when given a number if 123 is given as input then 1->2->3 will the output