from typing import List


def find_common_name_for_boxes(boxes: List[str]) -> str:
    """
    A brute-force solution for finding two boxes where the difference in box
    names is limited to a single character. Returns the common characters in
    the box names.

    The algorithm just loops through the boxes and compares the box name
    against all of the boxes after it. If the compared box names differ only by
    1 then we've found the boxes we're looking for.  Since the input is small
    this brute-force O(n^2) solution is fast enough.
    """
    for i, box_1 in enumerate(boxes):
        for box_2 in boxes[i + 1:]:
            differ = 0
            for character_1, character_2 in zip(box_1, box_2):
                if character_1 != character_2:
                    differ += 1
            if differ == 1:
                return ''.join(a for a, b in zip(box_1, box_2) if a == b)
    return ''