from typing import List
from typing import Tuple


def replace_one(title: str, abstract: str,
                concepts: List[Tuple[int, int, str]]) -> str:
    """
    Replace concepts in one PubMed article's title and abstract.
    :param title:     title string
    :param abstract:  abstract string
    :param concepts:  list of (start, end, concept_id) tuples
    :return:          string of title+abstract after replacements
    """
    all_text = ''.join([title, abstract])
    new_text = []
    current = 0
    for (start, end, cid) in concepts:
        new_text.append(all_text[current:start])
        new_text.append(cid)
        current = end
    new_text.append(all_text[current:])
    return ''.join(new_text)