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

def keys(self):
        '''Return all valid keys'''
        keys = []
        for key, value in self.map.items():
            if isinstance(value, Shovel):
                keys.extend([key + '.' + k for k in value.keys()])
            else:
                keys.append(key)
        return sorted(keys)