<p>Given a string array <code>words</code>, return <em>an array of all characters that show up in all strings within the </em><code>words</code><em> (including duplicates)</em>. You may return the answer in <strong>any order</strong>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> words = ["bella","label","roller"]
<strong>Output:</strong> ["e","l","l"]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> words = ["cool","lock","cook"]
<strong>Output:</strong> ["c","o"]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= words.length &lt;= 100</code></li>
	<li><code>1 &lt;= words[i].length &lt;= 100</code></li>
	<li><code>words[i]</code> consists of lowercase English letters.</li>
</ul>

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

static const bool Booster = [](){
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    return true;
}();


void parse_input_and_solve(std::ofstream& out, std::string& s) {
    // s = s.substr(1, s.length()-2);
    s.erase(s.begin());
    s.pop_back();
    vector<string> res;
    istringstream iss(s);
    string word;
    while(getline(iss, word, ',')) {
        word.erase(word.begin());
        word.pop_back();
        res.push_back(word);
    }
    vector<int> freq(26), minFreq(26, INT_MAX);
    for(auto& w:res) {
        fill(freq.begin(), freq.end(), 0);
        for(char& ch:w) freq[ch-97]++;
        for(int i=0; i<26; i++) {
            minFreq[i] = min(minFreq[i], freq[i]);
        }
    }
    
    s = "[";
    for(int i=0; i<26; i++) {
        for(int j=0; j<minFreq[i]; j++) {
            s += "\"" + string(1, char(i + 97)) + "\",";
        }
    }
    if(s.back() == ',') s.pop_back();
    s += "]";
    out << s << endl;
}

bool Solve = [](){
    std::ofstream out("user.out");
    for (std::string s; std::getline(std::cin, s);) {
        parse_input_and_solve(out, s);
    }
    out.flush();
    exit(0);
    return true;
}();


class Solution {
public:
    std::vector<std::string> commonChars(std::vector<std::string>& words) {
        return vector<string> ();
    }
};
9000