def get_program_abbrev(program):
    """Abbreviates a program's name
    
    Example: Major Concentration => Major"""
    program = program.replace('Major Concentration', 'Major').replace(
        'Minor Concentration', 'Minor')
    majors = []
    minors = []
    other = []
    for line in program.split('\n'):
        if line.startswith('Major'):
            majors.append(line.split('Major ')[1])
        elif line.startswith('Honours'):
            majors.append(line)
        elif line.startswith('Minor'):
            minors.append(line.split('Minor ')[1])
        else:
            other.append(line)
    program = ', '.join(majors)
    if minors:
        program += '; Minor ' + ', '.join(minors)
    if other:
        program += ' [' + ', '.join(other) + ']'
    return program
