Why doesn´t my program show the shortest strings?