The root of string S is a shortest string T such that S=TTTTT...T. That is, you can obtain S by concatenating T with itself many times.
The input file DATA1.txt will contain 5 lines, each line having one non empty string over the alphabet a,b,c,...,z.
The output file OUT1.txt will contain 5 lines. Each line contains the root of the corresponding line in DATA1.txt.
bbbbbbbbbbbb abcddeffab ataaattaataaattaataaattaataaatta
b abcddeffab ataaatta