Algo problem - Repeating strings