def qtr_to_master_url(qtr):
    """
    Build the URL for the master index of a given quarter.

    :param qtr: given qtr
    :return: string that represents the URL
    """
    assert type(qtr) == tuple
    url = 'https://www.sec.gov/Archives/edgar/full-index'
    return '{}/{}/QTR{}/master.zip'.format(url, qtr[0], qtr[1])
