class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def reverseList_recursion(head: ListNode, newHead: ListNode) -> ListNode:
if head is None:
return None
if head.next is None:
newHead = head
else:
newHead = reverseList_recursion(head.next, newHead)
head.next.next = head
head.next = None
return newHead