def reverseLinkedList(head):
    previousNode, currentNode = None, head
    while currentNode is not None:
		nextNode = currentNode.next
		currentNode.next = previousNode
		previousNode = currentNode
		currentNode = nextNode
	return previousNode	