Data Axle Interview Question

Code : maximum repeating substring in string. Ex: abcdefabcd answer must be abcd.