class Same {
public:
    bool checkSam(string stringA, string stringB) {
        // write code here
        map<char, int> mp;
        for (int i = 0; i < stringA.size(); ++i)
            mp[stringA[i]]++;
        for (int i = 0; i < stringB.size(); ++i)
            mp[stringB[i]]--;
        for (auto it : mp)
            if (it.second != 0)
                return false;
        return true;
    }
};