class Solution:
    def canConstruct(self, ransomNote: str, magazine: str) -> bool:
        for c in ransomNote:
            if not c in magazine:
                return False
            
            magazine = magazine.replace(c, "", 1)
        
        return True