Scan substrings right to left, swap suffixes.