<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def thumbnames(self):
 """Returns the filenames of all thumbnails in the thread."""

        if self.topic.has_file:
            yield self.topic.file.thumbnail_fname
        for reply in self.replies:
            if reply.has_file:
                yield reply.file.thumbnail_fname