Made changes to deleteRepetition method in System.out result.