<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self):
 """Return SAM formatted string Returns: str: SAM formatted string containing entire SAM entry """


        return '{0}\t{1}\t{2}\t{3}\t{4}\t' \
               '{5}\t{6}\t{7}\t{8}\t{9}\t' \
               '{10}{11}'.format(self.qname,
                                 str(self.flag),
                                 self.rname,
                                 str(self.pos),
                                 str(self.mapq),
                                 self.cigar,
                                 self.rnext,
                                 str(self.pnext),
                                 str(self.tlen),
                                 self.seq,
                                 self.qual,
                                 os.linesep)