import re

line = r'#Совп. А# ... #Совп. Б# ... #Совп. В#'

def repl(x, count):
    count.i += 1
    return '<{0}>{1}</{0}>'.format(str(count.i),x.group())
 
obj = lambda:None
obj.i =0
line = re.sub(r'#[^#]*#', lambda x: repl(x, obj), line)
print(line)