Find the Lexicographically Smallest Valid Sequence | dStruct