import os

class SimpleFastaReader:

    def __init__(self,file_name=None):
        self.file_name = file_name
        self.h = open(self.file_name)
        self.seq = ''
        self.id = None

    def next(self): 
        def read_id():
            return self.h.readline().strip()[1:]

        def read_seq():
            ret = ''
            while True:
                line = self.h.readline()
                
                while len(line) and not len(line.strip()):
                    # found empty line(s)
                    line = self.h.readline()
                
                if not len(line):
                    # EOF
                    break
                
                if line.startswith('>'):
                    # found new defline: move back to the start
                    self.h.seek(-len(line), os.SEEK_CUR)
                    break
                    
                else:
                    ret += line.strip()
                    
            return ret
        
        self.id = read_id()
        self.seq = read_seq()
        
        if self.id:
            return True  
            
    def close(self):
        self.h.close() 
54118d30ccf6263bfd0970381b4c509882d216c7
<mask token>


class SimpleFastaReader:
    <mask token>
    <mask token>
    <mask token>

<mask token>


class SimpleFastaReader:

    def __init__(self, file_name=None):
        self.file_name = file_name
        self.h = open(self.file_name)
        self.seq = ''
        self.id = None

    def next(self):

        def read_id():
            return self.h.readline().strip()[1:]

        def read_seq():
            ret = ''
            while True:
                line = self.h.readline()
                while len(line) and not len(line.strip()):
                    line = self.h.readline()
                if not len(line):
                    break
                if line.startswith('>'):
                    self.h.seek(-len(line), os.SEEK_CUR)
                    break
                else:
                    ret += line.strip()
            return ret
        self.id = read_id()
        self.seq = read_seq()
        if self.id:
            return True
    <mask token>

<mask token>


class SimpleFastaReader:

    def __init__(self, file_name=None):
        self.file_name = file_name
        self.h = open(self.file_name)
        self.seq = ''
        self.id = None

    def next(self):

        def read_id():
            return self.h.readline().strip()[1:]

        def read_seq():
            ret = ''
            while True:
                line = self.h.readline()
                while len(line) and not len(line.strip()):
                    line = self.h.readline()
                if not len(line):
                    break
                if line.startswith('>'):
                    self.h.seek(-len(line), os.SEEK_CUR)
                    break
                else:
                    ret += line.strip()
            return ret
        self.id = read_id()
        self.seq = read_seq()
        if self.id:
            return True

    def close(self):
        self.h.close()

import os


class SimpleFastaReader:

    def __init__(self, file_name=None):
        self.file_name = file_name
        self.h = open(self.file_name)
        self.seq = ''
        self.id = None

    def next(self):

        def read_id():
            return self.h.readline().strip()[1:]

        def read_seq():
            ret = ''
            while True:
                line = self.h.readline()
                while len(line) and not len(line.strip()):
                    line = self.h.readline()
                if not len(line):
                    break
                if line.startswith('>'):
                    self.h.seek(-len(line), os.SEEK_CUR)
                    break
                else:
                    ret += line.strip()
            return ret
        self.id = read_id()
        self.seq = read_seq()
        if self.id:
            return True

    def close(self):
        self.h.close()

import os

class SimpleFastaReader:

    def __init__(self,file_name=None):
        self.file_name = file_name
        self.h = open(self.file_name)
        self.seq = ''
        self.id = None

    def next(self): 
        def read_id():
            return self.h.readline().strip()[1:]

        def read_seq():
            ret = ''
            while True:
                line = self.h.readline()
                
                while len(line) and not len(line.strip()):
                    # found empty line(s)
                    line = self.h.readline()
                
                if not len(line):
                    # EOF
                    break
                
                if line.startswith('>'):
                    # found new defline: move back to the start
                    self.h.seek(-len(line), os.SEEK_CUR)
                    break
                    
                else:
                    ret += line.strip()
                    
            return ret
        
        self.id = read_id()
        self.seq = read_seq()
        
        if self.id:
            return True  
            
    def close(self):
        self.h.close() 