1061. Lexicographically Smallest Equivalent String Java Solution with Depth-First Search (DFS)