Write a script to calculate which category it really belongs to and remove the duplicates from other categories. <img width="749" height="1080" alt="Image" src="https://github.com/user-attachments/assets/c1b57b48-9d8e-4660-839e-072c608501e7" />