The function findMaxSubstring takes a string and returns the substring, which is equal to it in reverse.