def get_semester(datetime):
    """
    Given a datetime, estimate the semester of the period of course registration it occurred in.
    """
    if 3 <= datetime.month and datetime.month <= 9:
        sem = str(datetime.year) + "C"
    else:
        if datetime.month < 3:
            sem = str(datetime.year) + "A"
        else:
            sem = str(datetime.year + 1) + "A"
    return sem