<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getChain(self) :
        "returns a list of keys representing the chain of documents"
        l = []
        h = self.head
        while h :
            l.append(h._key)
            h = h.nextDoc
        return l