def scope2string(scope):
    """
        Auxiliary function that converts the scope (list of ints) into a string
        for printing.
    """
    if len(scope) <= 5:
        return scope
    res = ''
    first = scope[0]
    last = None
    for i in range(1, len(scope)-1):
        if scope[i-1] != scope[i]-1:
            first = scope[i]
        if scope[i]+1 != scope[i+1]:
            last = scope[i]
        if first is not None and last is not None:
            res += str(first) + ':' + str(last) + ' - '
            first = None
            last = None
    res += str(first) + ':' + str(scope[-1])
    return res