import random


def load_word_set(filename):
    """loads the words used as bingo labels, first line is the center"""
    lines = open(filename).readlines()
    if len(lines) < 25:
        raise Exception("Not enough labels in %s" % filename)

    total_word_list = [x.strip() for x in lines]
    center_word = total_word_list[0]
    words = random.sample(total_word_list[1:], 25)

    return center_word, words