Language: C++

#include <bits/stdc++.h>
#define itn int
#define REP(i, n) for (int i = 0; i < n; i++)
#define IREP(i, n) for (int i = n - 1; i >= 0; i--)
#define REPEACH(i,k) for(auto& i:k)
#define all(a) a.begin(),a.end()
#define MOD 1000000007
#define int long long
using namespace std;
typedef long long ll;

const ll INF = 1LL << 60;

signed main() {
	int n;
	cin >> n;
	vector<string> s(n);
	map<char,int> m;
	REP(i,n){
		map<char,bool> m2;
		cin >> s[i];
		REP(j,s[i].size()){
			if(m2.find(s[i])==m2.end()){
				m2[s[i]]=true;
				m[s[i]]++;
			}
		}
	}
	string ans="";
	REPEACH(i,m){
		if(i.second==n){
			ans+=i.first;
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:35: error: no matching function for call to 'std::map<char, bool>::find(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   23 |                         if(m2.find(s[i])==m2.end()){
      |                            ~~~~~~~^~~~~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:1224:9: note: candidate: 'template<class _Kt> decltype (((std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_find_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::find(const _Kt&) [with _Key = char; _Tp = bool; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1224 |         find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x))
      |         ^~~~
/usr/include/c++/14/bits/stl_map.h:1224:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_map.h: In substitution of 'template<class _Kt> decltype (((std::map<char, bool>*)this)->std::map<char, bool>::_M_t.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(__x)) std::map<char, bool>::find(const _Kt&) [with _Kt = std::__cxx11::basic_string<char>]':
a.cc:23:14:   required from here
   23 |                         if(m2.find(s[i])==m2.end()){
      |                            ~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_map.h:1224:57: error: no matching function for call to 'std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(const std::__cxx11::basic_string<char>&)'
 1224 |         find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x))
      |                                          ~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/map:62:
/usr/include/c++/14/bits/stl_tree.h:1291:9: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) [with _Req = _Kt; _Key = char; _Val = std::pair<const char, bool>; _KeyOfValue = std::_Select1st<std::pair<const char, bool> >; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1291 |         _M_find_tr(const _Kt& __k)
      |         ^~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:1291:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stl_function.h: In substitution of 'template<class _Func, class _SfinaeType> using std::__has_is_transparent_t = typename std::__has_is_transparent<_Func, _SfinaeType>::type [with _Func = std::less<char>; _SfinaeType = std::__cxx11::basic_string<char>]':
/usr/include/c++/14/bits/stl_tree.h:1289:9:   required by substitution of 'template<class _Kt> decltype (((std::map<char, bool>*)this)->std::map<char, bool>::_M_t.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(__x)) std::map<char, bool>::find(const _Kt&) [with _Kt = std::__cxx11::basic_string<char>]'
 1289 |                typename _Req = __has_is_transparent_t<_Compare, _Kt>>
      |                ^~~~~~~~
a.cc:23:14:   required from here
   23 |                         if(m2.find(s[i])==m2.end()){
      |                            ~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_function.h:1427:11: error: no type named 'type' in 'struct std::__has_is_transparent<std::less<char>, std::__cxx11::basic_string<char>, void>'
 1427 |     using __has_is_transparent_t
      |           ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_map.h: In substitution of 'template<class _Kt> decltype (((std::map<char, bool>*)this)->std::map<char, bool>::_M_t.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(__x)) std::map<char, bool>::find(const _Kt&) [with _Kt = std::__cxx11::basic_string<char>]':
a.cc:23:14:   required from here
   23 |                         if(m2.find(s[i])==m2.end()){
      |                            ~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_tree.h:1300:9: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) const [with _Req = _Kt; _Key = char; _Val = std::pair<const char, bool>; _KeyOfValue = std::_Select1st<std::pair<const char, bool> >; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1300 |         _M_find_tr(const _Kt& __k) const
      |         ^~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:1300:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_map.h:1249:9: note: candidate: 'template<class _Kt> decltype (((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_find_tr(__x)) std::map<_Key, _Tp, _Compare, _Alloc>::find(const _Kt&) const [with _Key = char; _Tp = bool; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1249 |         find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x))
      |         ^~~~
/usr/include/c++/14/bits/stl_map.h:1249:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_map.h: In substitution of 'template<class _Kt> decltype (((const std::map<char, bool>*)this)->std::map<char, bool>::_M_t.std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(__x)) std::map<char, bool>::find(const _Kt&) const [with _Kt = std::__cxx11::basic_string<char>]':
a.cc:23:14:   required from here
   23 |                         if(m2.find(s[i])==m2.end()){
      |                            ~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_map.h:1249:63: error: no matching function for call to 'std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::_M_find_tr(const std::__cxx11::basic_string<char>&) const'
 1249 |         find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x))
      |                                                ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/stl_tree.h:1291:9: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) [with _Req = _Kt; _Key = char; _Val = std::pair<const char, bool>; _KeyOfValue = std::_Select1st<std::pair<const char, bool> >; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1291 |         _M_find_tr(const _Kt& __k)
      |         ^~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:1291:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_tree.h:1300:9: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_find_tr(const _Kt&) const [with _Req = _Kt; _Key = char; _Val = std::pair<const char, bool>; _KeyOfValue = std::_Select1st<std::pair<const char, bool> >; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >]'
 1300 |         _M_find_tr(const _Kt& __k) const
      |         ^~~~~~~~~~
/usr/include/c++/14/bits/stl_tree.h:1300:9: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_map.h:1218:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) [with _Key = char; _Tp = bool; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >; iterator = std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::iterator; key_type = char]'
 1218 |       find(const key_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_map.h:1218:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<char, bool>::key_type&' {aka 'const char&'}
 1218 |       find(const key_type& __x)
      |            ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:1243:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const key_type&) const [with _Key = char; _Tp = bool; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, bool> >; const_iterator = std::_Rb_tree<char, std::pair<const char, bool>, std::_Select1st<std::pair<const char, bool> >, std::less<char>, std::allocator<std::pair<const char, bool> > >::const_iterator; key_type = char]'
 1243 |       find(const key_type& __x) const
      |       ^~~~
/usr/include/c++/14/bits/stl_map.h:1243:28: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<char, bool>::key_type&' {aka 'const char&'}
 1243 |       find(const key_type& __x) const
      |            ~~~~~~~~~~~~~~~~^~~
a.cc:24:35: error: no match for 'operator[]' (operand types are 'std::map<char, bool>' and '__gnu_cxx::__alloc_traits