added pgm to remove duplicate words using split