implemented printing linked list elements in reverse using recursion