def get_subsidiary_titles(inputs):
    """ Builds the subsidiary titles string. """
    result = ""
    if inputs is None:
        return result
    for title in inputs:
        if inputs.index(title) == len(inputs)-2:
            result = result+title+" "
        elif inputs.index(title) == len(inputs)-1:
            result = result+"and "+title+", "
        else:
            result = result+title+", "
    return result