def _eliminate_duplicates(l):
    """
    Removes duplicates from a list while maintaining the order of the elements (stable).
    :param l: The input list.
    :return: List with removed duplicates.
    """
    duplicate = [False] * len(l)
    for i1 in range(len(l)):
        e = l[i1]
        for i2 in range(i1 + 1, len(l)):
            if e == l[i2]:
                duplicate[i2] = True
    unique = []
    for i, d in zip(range(len(duplicate)), duplicate):
        if not d:
            unique.append(l[i])
    return unique
