Submitting an official solution before solving the problem yourself is a bannable offence.
Lemma: The string is sorted in reverse alphabetic order.
Proof: By contradiction - if the string is not, take the first occurrence of an index where . Deleting character results in a common subsequence that is lexicographically larger.
The solution follows directly from this - if a
z is present in the answer, it must be the first letter, so find the first
z in every string, and delete the prefix of each string up to and including that
z. Repeat until some string doesn't contain a
z. Repeat this process again with
y, and loop through the letters in reverse alphabetic order.