A  shortest_repetition.cpp