Language: C++

#include <bits/stdc++.h>

using namespace std;

multiset<string> set;
int a, b, c;

int main() {
    cin >> a >> b >> c;
    for(int i = 1; i <= a; i--) {
        set.insert("a");
    }
    for(int i = 1; i <= b; i--) {
        set.insert("b");
    }
    for(int i = 1; i <= c; i--) {
        set.insert("c");
    }
    while((set.size()) - 1 && set.size()) {
        string s = *set.begin(), t = *set.rbegin();
        set.erase(set.lower_bound(s));
        set.erase(set.lower_bound(t));
        set.insert(s + t);
    }
    printf("%s\n",(*set.begin()).c_str());
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: reference to 'set' is ambiguous
   11 |         set.insert("a");
      |         ^~~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:14:9: error: reference to 'set' is ambiguous
   14 |         set.insert("b");
      |         ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:17:9: error: reference to 'set' is ambiguous
   17 |         set.insert("c");
      |         ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:19:12: error: reference to 'set' is ambiguous
   19 |     while((set.size()) - 1 && set.size()) {
      |            ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:19:31: error: reference to 'set' is ambiguous
   19 |     while((set.size()) - 1 && set.size()) {
      |                               ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:20:21: error: reference to 'set' is ambiguous
   20 |         string s = *set.begin(), t = *set.rbegin();
      |                     ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:21:9: error: reference to 'set' is ambiguous
   21 |         set.erase(set.lower_bound(s));
      |         ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:21:19: error: reference to 'set' is ambiguous
   21 |         set.erase(set.lower_bound(s));
      |                   ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:22:9: error: reference to 'set' is ambiguous
   22 |         set.erase(set.lower_bound(t));
      |         ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:22:19: error: reference to 'set' is ambiguous
   22 |         set.erase(set.lower_bound(t));
      |                   ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:22:35: error: 't' was not declared in this scope
   22 |         set.erase(set.lower_bound(t));
      |                                   ^
a.cc:23:9: error: reference to 'set' is ambiguous
   23 |         set.insert(s + t);
      |         ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~
a.cc:25:21: error: reference to 'set' is ambiguous
   25 |     printf("%s\n",(*set.begin()).c_str());
      |                     ^~~
/usr/include/c++/14/bits/stl_set.h:96:11: note: candidates are: 'template<class _Key, class _Compare, class _Alloc> class std::set'
   96 |     class set
      |           ^~~
a.cc:5:18: note:                 'std::multiset<std::__cxx11::basic_string<char> > set'
    5 | multiset<string> set;
      |                  ^~~