import string


def buildCoder(shift):
    """
    Returns a dict that can apply a Caesar cipher to a letter.
    The cipher is defined by the shift value. Ignores non-letter characters
    like punctuation, numbers and spaces.

    shift: 0 <= int < 26
    returns: dict
    """
    # initialize empty dictionary
    dict = {}
    
    # create lists for keys based on lower case and upper case alphabet
    lower_keys =list(string.ascii_lowercase)
    upper_keys = list(string.ascii_uppercase)
    
    # initialize empty list for values
    lower_vals = []
    upper_vals = []    
    
    # create value lists based on shifting the lower and upper keys
    for key in lower_keys:
        index = shift % 26
        shift += 1
        lower_vals.append(lower_keys[index])
    for key in upper_keys:
        index = shift % 26
        shift += 1
        upper_vals.append(upper_keys[index])
        
    # create total key and value lists
    all_keys = upper_keys + lower_keys
    all_vals = upper_vals + lower_vals
    index = 0
    
    # for each key in all_keys, add the value from all_vals
    for k in all_keys:
        dict[k] = all_vals[index]
        index += 1
    
    return dict