@classmethod
def _restore_aux(cls, text, marks, num):
    """Auxiliary method for Punctuation.restore()"""
    if not marks:
        return text
    current = marks[0]
    if current.index == num:
        if current.position == 'B':
            return cls._restore_aux([current.mark + text[0]] + text[1:],
                marks[1:], num)
        if current.position == 'E':
            return [text[0] + current.mark] + cls._restore_aux(text[1:],
                marks[1:], num + 1)
        if current.position == 'A':
            return [current.mark] + cls._restore_aux(text, marks[1:], num + 1)
        if len(text) == 1:
            restored = cls._restore_aux([text[0] + current.mark], marks[1:],
                num)
        else:
            restored = cls._restore_aux([text[0] + current.mark + text[1]] +
                text[2:], marks[1:], num)
        return restored
    else:
        return [text[0]] + cls._restore_aux(text[1:], marks, num + 1)
