class Node:
def __init__(self, data, next=None):
self.data, self.next = data, next
class LinkList:
def __init__(self, lst):
self.head = Node(lst[0])
p = self.head
for i in lst[1:]:
node = Node(i)
p.next = _____①_________ # (1 分)
p = _____②_________ # (2 分)
def reverse(self):
p = self.head.next
self.head.next = __③__ # (2 分)
while p is not None:
q = p
p = ______④________ # (1 分)
q.next = ______⑤________ # (2 分)
______⑥________ # (2 分)
def print(self):
p = self.head
while p:
print(p.data, end=" ")
p = p.next
print()
a = list(map(int, input().split()))
a = LinkList(a)
a.reverse()
a.print()
请填写下列空:① _________ ② _________ ③ _________ ④ _________ ⑤ _________ ⑥ _________