def METHOD_NAME(rows,cols,names):
    tuple_list = []
    for (i,j) in zip(rows,cols):
        sorted_pair = tuple(sorted((names[i],names[j])))
        tuple_list.append(sorted_pair)
    return tuple_list