I have a CSV file with the following format:

```
User1, User2
1,2
1,3
2,1

```

I am trying to remove the non-duplicated reverse values, so in this instance I would like to remove `1,3` as it doesn't have a reverse duplicate of `3,1`

I currently have this script which removes the duplicate values:

```
import csv

reader=csv.reader(open('facebook-friendships.csv', 'r'), delimiter=',')
writer=csv.writer(open('facebook-friendships-write.csv', 'w'), delimiter=',')

entries = set()

for row in reader:
   key = (row[0], row[1])
   key = tuple(key)
   if key in entries and key[::-1] in entries:
       writer.writerow(row)
       entries.add(key)

```

How would I edit this script to remove the non-duplicated reverse values? So that I am only left with 

```
1,2
2,1

```

Thanks