from typing import List


def build_location_line(split_ids: List[str], keys: List[str], delimiter: str) -> str:
    """
    Builds the locations and lines based on the configuration.

    :param split_ids: The split IDs
    :param keys: The locations or lines keys position to join from IDs
    :return: The joined locations or lines
    """

    temp_list = []

    for key in keys:
        if len(split_ids) - 1 >= int(key):
            temp_list.append(split_ids[int(key)])

    return delimiter.join(temp_list)