def incrementName(nameList, name):
    if name not in nameList:
        return name
    newName = name + str(1)
    for n in range(1, len(nameList) + 2):
        found = False
        for b in nameList:
            newName = name + str(n)
            if b == newName:
                found = True
        if not found:
            break
    return newName