def extendByBlanks(seq, b):
    """extends a label seq. by adding blanks at the beginning, end and in between each label"""
    res = [b]
    for s in seq:
        res.append(s)
        res.append(b)
    return res
