def interval_set_to_string(intervals, separator=' '):
    """
    Convert interval set to strings:

    >>> interval_set_to_string([(1, 2), (5, 5), (10, 50)])
    '1-2 5 10-50'
    """
    res = ''
    for begin, end in intervals:
        if begin == end:
            res += separator + str(begin)
        else:
            res += separator + '{}-{}'.format(begin, end)
    return res.strip(separator)
