The string abcabac has a peculiar property: each permutation of a, b, and c occurs in it as a subsequence:
Your task is to ﬁnd such a string for the entire English alphabet. That is, a string such that each of the 26! permutations of a through z occurs in it as a subsequence.
There is no input.
Your output must contain a single line with a string of lowercase English letters.
For the easy subproblem R1 we will accept any valid string that has at most 660 letters.
For the hard subproblem R2 we will accept any valid string that has at most 640 letters.
(There are valid answers shorter than 630 letters.)