class ListNode: def __init__(self, x): self.val = x self.next = None head1 = ListNode(7) node1 = ListNode(0) node2 = ListNode(8) head1.next = node1 node1.next = node2