Completed printDuplicates