Program to reverse a linked list.