MOST OPTIMIZED PYTHON SOLUTION  || CLASS BASED STRUCTURE
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Disjoint:\n    def __init__(self,n):\n        self.size=[1]*n\n        self.parent=[i for i in range(n)]\n\n    def findUPar(self,node):\n        if node==self.parent[node]:\n            return node\n        self.parent[node]=self.findUPar(self.parent[node])\n        return self.parent[node]\n\n    def union(self,u,v):\n        ulp_u=self.findUPar(u)\n        ulp_v=self.findUPar(v)\n        if ulp_u==ulp_v:\n            return\n        if ulp_u<ulp_v:\n            self.parent[ulp_v]=ulp_u\n        elif ulp_u>ulp_v:\n            self.parent[ulp_u]=ulp_v\n            \n\nclass Solution:\n    def smallestEquivalentString(self, s1: str, s2: str, baseStr: str) -> str:\n        disjoint=Disjoint(26)\n        n=len(s1)\n        for i in range(n):\n            # print(s1[i],s2[i],ord(s1[i])-97,ord(s2[i])-97)\n            disjoint.union(ord(s1[i])-97,ord(s2[i])-97)\n        \n        st=""\n        for i in range(26):\n            disjoint.findUPar(i)\n        # print(disjoint.parent)\n\n        for i in baseStr:\n            x=disjoint.findUPar(ord(i)-97)\n            st+=chr(x+97)\n        return st\n```
['Python3']