Replace written list with a set