Add the solution for loginestString without repetition