Problem:
D: パスワード
問題
AOR イカちゃんは英小文字のみからなる強力なパスワードを作りたいと思っています。
友達から $N$ 個の危険なパスワードの例を教えてもらった AOR イカちゃんは、
以下の条件を全て満たすようなパスワードを作ることにしました。
長さは1文字以上である。
どの危険なパスワードの、どの連続した部分文字列とも異なる。
1, 2 の条件を満たした中で、最も短い文字列である。
1,2,3の条件を満たした中で、辞書順に並べたとき先頭に来る文字列である。
AOR イカちゃんに代わって強力なパスワードを生成するプログラムを書いてください。
入力
入力は以下の形式で標準入力から与えられる。
$N$
$S_1$
$\vdots$
$S_N$
1 行目には、文字列の数を表す整数 $N$ が与えられる。
2 行目からの $N$ 行には、文字列 $S_i$ が与えられる。
$|S_i|$ とは文字列の長さであり、1 文字以上である。
$1 \le N \le 100,000$ を満たす。
$1 \le \sum_{1\le i \le N} |S_i| \le 400,000$ を満たす。
文字列は英小文字のみを含む。
出力
答えを 1 行で出力せよ。また、末尾に改行も出力せよ。
サンプル
サンプル入力 1
5
password
login
admin
root
master
サンプル出力 1
b
サンプル入力 2
3
abcdefghijklmnopqrstuvwxy
qwertyuiopasdfghjklxcvbnm
qawsxedcrfvtgbyhnujmikolp
サンプル出力 2
z
サンプル入力 3
1
abcdefghijklmnopqrstuvwxyz
サンプル出力 3
aa

Submitted solutions:

code_snippet: #include <bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

struct RollingHash
{
	vector<ull> hash, pow;
	RollingHash(string s, ull _b = 1000000007)
	{
		_b = _b;
		int sz = s.length();
		hash.assign(sz + 1, 0);
		pow.assign(sz + 1, 0);

		pow[0] = 1;
		for (int i = 0; i<sz; i++) {
			pow[i + 1] = pow[i] * _b;
		}
		for (int i = 0; i<sz; i++) {
			hash[i + 1] = (hash[i] + s[i])*_b;
		}
	}
	ull get(int l, int r) {
		return (hash[r] - hash[l] * pow[r - l]);
	}
};

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int N;
	cin >> N;
	vector<string> S(N);
	set<ull> st;
	for (int i = 0; i < N; i++) {
		cin >> S[i];
		RollingHash rh(S[i]);
		int n = S[i].size();
		for (int l = 0; l <= 4; l++) {
			for (int i = 0; i + l <= n; i++) {
				st.insert(rh.get(i, i + l));
			}
		}
	}
	string s = "a";
	for (s[0] = 'a'; s[0] <= 'z'; s[0]++) {
		ull val = RollingHash(s).get(0, 1);
		if (st.count(val) == 0) {
			cout << s << endl;
			return 0;
		}
	}
	s = "aa";
	for (s[0] = 'a'; s[0] <= 'z'; s[0]++) {
		for (s[1] = 'a'; s[1] <= 'z'; s[1]++) {
			ull val = RollingHash(s).get(0, 2);
			if (st.count(val) == 0) {
				cout << s << endl;
				return 0;
			}
		}
	}
	s = "aaa";
	for (s[0] = 'a'; s[0] <= 'z'; s[0]++) {
		for (s[1] = 'a'; s[1] <= 'z'; s[1]++) {
			for (s[2] = 'a'; s[2] <= 'z'; s[2]++) {
				ull val = RollingHash(s).get(0, 3);
				if (st.count(val) == 0) {
					cout << s << endl;
					return 0;
				}
			}
		}
	}
	s = "aaaa";
	for (s[0] = 'a'; s[0] <= 'z'; s[0]++) {
		for (s[1] = 'a'; s[1] <= 'z'; s[1]++) {
			for (s[2] = 'a'; s[2] <= 'z'; s[2]++) {
				for (s[3] = 'a'; s[3] <= 'z'; s[3]++) {
					ull val = RollingHash(s).get(0, 4);
					if (st.count(val) == 0) {
						cout << s << endl;
						return 0;
					}
				}
			}
		}
	}
	return 0;
}
accuracy: 1
time_ms: 190
memory_kb: 29276
final_rank: 3

code_snippet: #include <bits/stdc++.h>
using namespace std;

#define ll long long

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) begin(v), end(v)
// #define BIT(n) (1LL << (n))
#define MAX(type) numeric_limits<type>::max()
#define MIN(type) numeric_limits<type>::min()
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
template <class T> using vec = vector<T>;

signed main() {
  int N;
  cin >> N;
  vec<string> S(N);
  rep(i, N) {
    cin >> S[i];
  }

  // 8文字以下の文字列は26+26^2+...+26^8=216'871'231'382 > 160'000'000'000
  // なので8文字以下

  vec<unordered_set<string>> st(8);
  rep(i, N) {
    rep(j, 8) {
      rep(k, max(0LL,(int) S[i].length() - j)) {
        st[j].insert(S[i].substr(k, j+1));
      }
    }
  }

  auto num_to_str = [&](int len, ll num) {
    string ans(len+1, 'a');
    rep(i, len+1) {
      ans[i] = 'a' + num % 26;
      num /= 26;
    }
    reverse(all(ans));
    return ans;
  };
// rep(i, 100) cout << num_to_str(3, i) << endl;

  rep(i, 8) {
    ll pow26 = 1;
    rep(j, i+1) pow26 *= 26;
    if(pow26 == st[i].size()) {
      continue;
    } else {
      rep(j, pow26) {
        // cout << "j = " << j << ", str = " << num_to_str(i, j) << endl;
        if(!st[i].count(num_to_str(i, j))) {
          cout << num_to_str(i, j) << endl;
          return 0;
        }
      }
    }
  }

}
accuracy: 1
time_ms: 660
memory_kb: 147056
final_rank: 15

code_snippet: #include <bits/stdc++.h>
using namespace std;

#define ll long long

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define all(v) begin(v), end(v)
// #define BIT(n) (1LL << (n))
#define MAX(type) numeric_limits<type>::max()
#define MIN(type) numeric_limits<type>::min()
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
template <class T> using vec = vector<T>;

signed main() {
  int N;
  cin >> N;
  vec<string> S(N);
  rep(i, N) {
    cin >> S[i];
  }

  // 8文字以下の文字列は26+26^2+...+26^8=216'871'231'382 > 160'000'000'000
  // なので8文字以下

  /*
  struct Vert {
    Vert* parent;
    map<char, Vert*> children;
    char content;
  public:
    Vert(Vert* p, map<char, vec<Vert*>> child, char c): parent(p), children(child), content(c) {}
  };
  deque<Vert*> verts;
  rep(i, N) {
    Vert* parent = nullptr;
    rep(j, 8) {
      Vert* v = new Vert(parent, {}, S[i][j]);
      verts.push_back(v);
      parent->children[S[i][j];
    }
  }
*/
  vec<unordered_set<string>> st(8);
  rep(i, N) {
    // cout << S[i].length() << endl;
    rep(j, 8) {
      rep(k, max(0LL,(int) S[i].length() - j)) {
        st[j].insert(S[i].substr(k, j+1));
        // cout << "i : " << i << ", j : " << j << ", k : " << k << endl;
        // cout << "insert : " << S[i].substr(k, j+1) << endl;
      }
    }
  }
  // for(auto s : st) cout << s << endl;

  /*
  auto get_num = [&](string s) {
    int ans = 0;
    rep(i, s.size()) {
      ans += pow(26, i) * (s[i] - 'a');
    }
    return ans;
  };
  */
  auto num_to_str = [&](int len, ll num) {
    string ans(len+1, 'a');
    rep(i, len+1) {
      ans[i] = 'a' + num % 26;
      num /= 26;
    }
    return ans;
  };
  /*
  auto is_ok = [&](int len, int loc){
    int num = 0;
    rep(i, s[len][loc].size()) {
      num += (s[len][loc][i] - 'a' + 1) * pow(26, i);
    }
    // cout << "loc = " << loc << ", num = " << num << endl;
    return loc+1 == num;
  };
  auto get_str_at = [](int len, int loc){
    string s;
    rep(i, len + 1) {
      s.push_back('a' + loc % 26);
      loc /= 26;
    }
    return s;
  };
  */

  rep(i, 8) {
    // cout << "i = " << i << ", size = " <<  st[i].size() << endl;
    ll pow26 = 1;
    rep(j, i+1) pow26 *= 26;
    if(pow26 == st[i].size()) {
      continue;
    } else {
      /*
      int ok = -1, ng = st[i].size();
      while(ng - ok > 1) {
        int mid = (ng + ok) / 2;
        if(is_ok(i, mid)) ok = mid;
        else ng = mid;
      }
      cout << get_str_at(i, ng) << endl;
      break;
      */
      rep(j, pow26) {
        // cout << "j = " << j << ", str = " << num_to_str(i, j) << endl;
        if(!st[i].count(num_to_str(i, j))) {
          cout << num_to_str(i, j) << endl;
          return 0;
        }
      }
    }
  }
  /*
  */

}
accuracy: 0.08333333333333333
time_ms: 400
memory_kb: 146744
final_rank: 20

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T> using pq = priority_queue<T, vector<T>, greater<T>>;
const ll LINF=0x1fffffffffffffff;
const ll MINF=0x7fffffffffff;
const int INF=0x3fffffff;
const int MOD=1000000007;
const int MOD2=998244353;
const ld EPS=1e-9;
const ld PI=3.14159265358979323846;
const ll dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const ll dy[] = {1, 0, -1, 0, 1, 1, -1, -1};
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define per(i, b) per2(i, 0, b)
#define per2(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define ALL(c) (c).begin(), (c).end()
#define SZ(x) ((int)(x).size())
#define nep(x) next_permutation(ALL(x))
template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;
template <class T>
using VVV = V<VV<T>>;
template <class T>
using VVVV = V<VVV<T>>;
template <class T>
using V_p = V<pair<T,T>>;
template <class T>
using n_pq = priority_queue<T>;
template <class T>
using r_pq = priority_queue<T,vector<T>,greater<T>>;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
template <class T>ostream &operator<<(ostream &o,const deque<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
template <class T>ostream &operator<<(ostream &o,const set<T>&v)
{o<<"{";for(auto i:v)o<<" "<<i;o<<"}";return o;}
ll pow_ll(ll x, ll n) {
    long long ret = 1;
    while (n > 0) {
        if (n & 1) ret *= x;  // n の最下位bitが 1 ならば x^(2^i) をかける
        x *= x;
        n >>= 1;  // n を1bit 左にずらす
    }
    return ret;
}


////////////////////////////////////////////////////

V<string> s_l;
V<string> s_l_2;
V<string> s_l_3;
V<string> s_l_4;
void solve1(string s) {

    if (s.length() == 1) {
        s_l.pb(s);
        return;
    }
    rep(i,26) {
        solve1(s+char('a' + i));
    }
}

void solve2(string s) {

    if (s.length() == 2) {
        s_l_2.pb(s);
        return;
    }
    rep(i,26) {
        solve2(s+char('a' + i));
    }
}

void solve3(string s) {

    if (s.length() == 3) {
        s_l_3.pb(s);
        return;
    }
    rep(i,26) {
        solve3(s+char('a' + i));
    }
}

void solve4(string s) {

    if (s.length() == 4) {
        s_l_4.pb(s);
        return;
    }
    rep(i,26) {
        solve4(s+char('a' + i));
    }
}

int main() {
    solve1("");
    solve2("");
    solve3("");
    solve4("");
    sort(ALL(s_l));
    sort(ALL(s_l_2));
    sort(ALL(s_l_3));
    sort(ALL(s_l_4));

    s_l.insert(s_l.end(), s_l_2.begin(), s_l_2.end());
    s_l.insert(s_l.end(), s_l_3.begin(), s_l_3.end());
    s_l.insert(s_l.end(), s_l_4.begin(), s_l_4.end());
        

    ll N,tmp;
    ll s_size;
    unordered_set<string> _set = {}; 
    cin >> N;
    string T;
    rep(j,N) {

        string S;
        cin >> S;
        s_size = S.length();
        if (s_size+1>5) {
            tmp = 5;
        }
        else {
            tmp = s_size+1;
        }
        rep2(k,1,tmp){

            rep(st,s_size-k+1) {
                T = S.substr(st,k);
                _set.insert(T);

            }

        }
    }

    for (auto &tmp_st:s_l) {
        if (_set.count(tmp_st) == 0) {
            cout << tmp_st << endl;
            break;
        }
    }



}
accuracy: 1
time_ms: 210
memory_kb: 64760
final_rank: 8

code_snippet: #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <unordered_map>
using namespace std;
int n;
string s[100005];
unordered_map<string, bool> mp;
typedef long long ll;
int main()
{
    cin >> n;
    for (int i = 1; i <= n; ++i)
    {
        cin >> s[i];
        for (int j = 0; j < s[i].length(); ++j)
            for (int k = 1; k <= 4; ++k)
            {
                string a = "";
                for (int l = j; l < j + k; ++l)
                    a += s[i][l];
                mp[a] = 1;
            }
    }
    for (int a = 1; a <= 26; ++a)
    {
        string tmp = "";
        if (a)
            tmp += a + 'a' - 1;
        if (!mp[tmp])
        {
            cout << tmp << endl;
            return 0;
        }
    }
    for (int a = 1; a <= 26; ++a)
        for (int b = 1; b <= 26; ++b)
        {
            string tmp = "";
            if (a)
                tmp += a + 'a' - 1;
            if (b)
                tmp += b + 'a' - 1;
            if (!mp[tmp])
            {
                cout << tmp << endl;
                return 0;
            }
        }
    for (int a = 1; a <= 26; ++a)
        for (int b = 1; b <= 26; ++b)
            for (int c = 1; c <= 26; ++c)
            {
                string tmp = "";
                if (a)
                    tmp += a + 'a' - 1;
                if (b)
                    tmp += b + 'a' - 1;
                if (c)
                    tmp += c + 'a' - 1;
                if (!mp[tmp])
                {
                    cout << tmp << endl;
                    return 0;
                }
            }
    for (int a = 1; a <= 26; ++a)
        for (int b = 1; b <= 26; ++b)
            for (int c = 1; c <= 26; ++c)
                for (int d = 1; d <= 26; ++d)
                {
                    string tmp = "";
                    if (a)
                        tmp += a + 'a' - 1;
                    if (b)
                        tmp += b + 'a' - 1;
                    if (c)
                        tmp += c + 'a' - 1;
                    if (d)
                        tmp += d + 'a' - 1;
                    if (!mp[tmp])
                    {
                        cout << tmp << endl;
                        return 0;
                    }
                }
    return 0;
}
accuracy: 1
time_ms: 160
memory_kb: 36124
final_rank: 4

code_snippet: #include <bits/stdc++.h>
using namespace std;

//高速化 
struct ponjuice{ponjuice(){cin.tie(0);ios::sync_with_stdio(0);cout<<fixed<<setprecision(20);}}PonJuice;
//#define endl '\n' //インタラクティブ問題の時は消す

//型
using ll = long long;
using ld = long double;
template<class T>using vc = vector<T>; template<class T>using vvc = vc<vc<T>>; template<class T>using vvvc = vvc<vc<T>>;
using vi = vc<int>;  using vvi = vvc<int>;  using vvvi = vvvc<int>;
using vl = vc<ll>;   using vvl = vvc<ll>;   using vvvl = vvvc<ll>;
using pi = pair<int, int>;  using pl = pair<ll, ll>;
using ull = unsigned ll;
template<class T>using priq = priority_queue<T>;
template<class T>using priqg = priority_queue<T, vc<T>, greater<T>>;

// for文
#define overload4(a, b, c, d, e, ...) e
#define rep1(n)             for(ll i = 0; i < n; i++)
#define rep2(i, n)          for(ll i = 0; i < n; i++)
#define rep3(i, a, b)       for(ll i = a; i < b; i++)
#define rep4(i, a, b, step) for(ll i = a; i < b; i+= step)
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define per1(n)             for(ll i = n-1; i >= 0; i--)
#define per2(i, n)          for(ll i = n-1; i >= 0; i--)
#define per3(i, a, b)       for(ll i = b-1; i >= a; i--)
#define per4(i, a, b, step) for(ll i = b-1; i >= a; i-= step)
#define per(...) overload4(__VA_ARGS__, per4, per3, per2, per1)(__VA_ARGS__)
#define fore1(a)       for(auto&& i : a)	
#define fore2(i,a)     for(auto&& i : a)
#define fore3(x,y,a)   for(auto&& [x, y] : a)
#define fore4(x,y,z,a) for(auto&& [x, y, z] : a)
#define fore(...) overload4(__VA_ARGS__, fore4, fore3, fore2, fore1)(__VA_ARGS__)

//関数
#define mp make_pair
#define mt make_tuple
#define a first
#define b second
#define pb emplace_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define si(x) (ll)(x).size()
template<class S, class T>inline bool chmax(S& a, T b){return a < b && ( a = b , true);}
inline bool chmin(string& a, string b){
    if(a.size() > b.size()) {
        a = b;
        return true;
    }
    return a > b && ( a = b , true);
}
template<class T>void uniq(vc<T>&a){sort(all(a));a.erase(unique(all(a)),a.end());}
template<class T>vc<T> operator++(vc<T>&v,signed){auto res = v;fore(e,v)e++;return res;}
template<class T>vc<T> operator--(vc<T>&v,signed){auto res = v;fore(e,v)e--;return res;}
template<class T>vc<T> operator++(vc<T>&v){fore(e,v)e++;return v;}
template<class T>vc<T> operator--(vc<T>&v){fore(e,v)e--;return v;}

//入出力(operator)
template<class S,class T>istream&operator>>(istream&is,pair<S,T>&a){is>>a.a>>a.b;return is;}
template<class T>istream&operator>>(istream&is,vc<T>&a){fore(e,a)is>>e;return is;}

template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>&a){return os<<a.a<<" "<<a.b;}
template<class T>ostream&operator<<(ostream&os,set<T>&a){fore(it,a){os<<it<<" ";}return os;}
template<class T>ostream&operator<<(ostream&os,multiset<T>&a){fore(it,a){os<<it<<" ";}return os;}
template<class S,class T>ostream&operator<<(ostream&os,map<S,T>&a){fore(x,y,a){os<<x<<" "<<y<<"\n";}return os;}
template<class T>ostream&operator<<(ostream&os,unordered_set<T>&a){fore(it,a){os<<it<<" ";}return os;}
template<class S,class T>ostream&operator<<(ostream&os,unordered_map<S,T>&a){fore(x,y,a){os<<x<<" "<<y<<"\n";}return os;}
template<class T>ostream&operator<<(ostream&os,vc<T>&a){fore(e,a)os<<e<<" ";return os;}
template<class T>ostream&operator<<(ostream&os,vvc<T>&a){fore(e,a)os<<e<<"\n";return os;}

//入出力(関数)
vi readvi(ll n){vi a(n);cin>>a;return a;}
vl readvl(ll n){vl a(n);cin>>a;return a;}
vvi readg(ll n,ll m,bool bidirected=true){vvi g(n);rep(i,m){ll a,b;cin>>a>>b;a--;b--;g[a].pb(b);if(bidirected)g[b].pb(a);}return g;}
vvc<pi>readgc(ll n,ll m,bool bidirected=true){vvc<pi> g(n);rep(i,m){ll a,b,c;cin>>a>>b>>c;a--;b--;g[a].pb(b,c);if(bidirected)g[b].pb(a,c);}return g;}
vvi readt(ll n,bool bidirected=true){return readg(n,n-1,bidirected);}
vvc<pi> readtc(ll n,bool bidirected=true){return readgc(n,n-1,bidirected);}

inline void yes(){cout << "Yes\n";}
inline void no(){cout << "No\n";}
inline void yesno(bool y = true){if(y)yes();else no();}

//定数
constexpr ll mod = 998244353;
constexpr ll minf=-(1<<29);
constexpr ll inf=(1<<29);
constexpr ll MINF=-(1LL<<60);
constexpr ll INF=(1LL<<60);
constexpr ld EPS = 1e-8;
const ld PI = acosl(-1);
#define equals(a, b) (abs((a) - (b)) < EPS)
const int dx[4] ={-1, 0, 1, 0};
const int dy[4] ={ 0, 1, 0,-1};
const int dx8[8] ={-1,-1,-1, 0, 1, 1, 1, 0};
const int dy8[8] ={-1, 0, 1, 1, 1, 0,-1,-1};

void solve();
int main() {
	int t = 1;
    // cin >>t;
    while(t--)solve();
}



void solve(){
    int n;
    cin >> n;
    string s;
    set<string> st;
    rep(i,n){
        cin >> s;
        rep(j,si(s)){
            string t = "";
            rep(k,5){
                if(j + k >= si(s))break;
                t += s[(j + k)];
                st.insert(t);
            }
        }
    }


    string ans = "xxxxxxxx";
    rep(i1,26){
        string t1 = string(1, 'a' + i1);
        if(st.find(t1) == st.end()) chmin(ans,t1);
        rep(i2,26){
            if(ans.size() < 2)break;
            string t2 = t1 + char('a' + i2);
            if(st.find(t2) == st.end()) chmin(ans,t2);
            rep(i3,26){
                if(ans.size() < 3)break;
                string t3 = t2 + char('a' + i3);
                if(st.find(t3) == st.end()) chmin(ans,t3);
                rep(i4,26){
                    if(ans.size() < 4)break;
                    string t4 = t3 + char('a' + i4);
                    if(st.find(t4) == st.end()) chmin(ans,t4);
                    rep(i5,26){
                        if(ans.size() < 5)break;
                        string t5 = t4 + char('a' + i5);
                        if(st.find(t5) == st.end()) chmin(ans,t5);
                    }
                }
            }
        }
    }
    cout << ans << endl;
}
accuracy: 1
time_ms: 900
memory_kb: 67392
final_rank: 14

code_snippet: #include "bits/stdc++.h"
using namespace std;

#define REP(i, n) for(ll i = 0;i < n;i++)
#define REPR(i, n) for(ll i = n;i >= 0;i--)
#define FOR(i, m, n) for(ll i = m;i < n;i++)
#define FORR(i, m, n) for(ll i = m;i >= n;i--)
#define REPO(i, n) for(ll i = 1;i <= n;i++)
#define ll long long
#define INF (ll)1ll << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(),n.end()
#define MOD (ll)1000000007
#define P pair<ll, ll>

map<string, ll> mp;

bool ok = false;
string ans = "";
void dfs(ll a, ll b){
    if(a == b){
        if(mp[ans] == 0){
            ok = true;
        }
        return;
    }
    if (ok) return;
    REP(i, 26){
        ans += 'a' + i;
        dfs(a + 1, b);
        if (ok) return;
        ans.pop_back();
    }
}
int main(){
    ll n;
    cin >> n;
    REP(i, n){
        string s;
        cin >> s;
        REP(j, 4){
            if((ll)s.size() - j <= 0)continue;
            REP(k, (ll)s.size() - j){
                mp[s.substr(k, j + 1)]++;
            }
        }
    }
    bool ok = false;
    REPO(i, 4){
        if (ok) break;
        dfs(0, i);
    }
    cout << ans << endl;
}
accuracy: 1
time_ms: 340
memory_kb: 35956
final_rank: 5

code_snippet: #include "bits/stdc++.h"
using namespace std;

#define REP(i, n) for(ll i = 0;i < n;i++)
#define REPR(i, n) for(ll i = n;i >= 0;i--)
#define FOR(i, m, n) for(ll i = m;i < n;i++)
#define FORR(i, m, n) for(ll i = m;i >= n;i--)
#define REPO(i, n) for(ll i = 1;i <= n;i++)
#define ll long long
#define INF (ll)1ll << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(),n.end()
#define MOD (ll)1000000007
#define P pair<ll, ll>

map<string, ll> mp;

bool ok = false;
string ans = "";
void dfs(ll a, ll b){
    if(a == b){
        if(mp[ans] == 0){
            ok = true;
        }
        return;
    }
    if (ok) return;
    REP(i, 26){
        ans += 'a' + i;
        dfs(a + 1, b);
        if (ok) return;
        ans.pop_back();
    }
}
int main(){
    ll n;
    cin >> n;
    REP(i, n){
        string s;
        cin >> s;
        REP(j, 4){
            REP(k, s.size() - j){
                mp[s.substr(k, j + 1)]++;
            }
        }
    }
    bool ok = false;
    REPO(i, 4){
        if (ok) break;
        dfs(0, i);
    }
    cout << ans << endl;
}
accuracy: 0.25
time_ms: 220
memory_kb: 35748
final_rank: 16

code_snippet: #pragma GCC optimize("O3")
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
template<class T> using V=vector<T>; 
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
const vector<int> dy={-1,0,1,0},dx={0,-1,0,1};
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(20);}} __init;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T>void debag(const vector<T> &a){cerr<<"debag :";for(auto v:a)cerr<<v<<" ";cerr<<"\n";}
template<class T>void print(const vector<T> &a){for(auto v:a)cout<<v<<" ";cout<<"\n";}
template<class T> struct RollingHash{
    using ull=unsigned long long int;
    const ull M=(1ull<<61)-1;
    const ull mask30 = (1ull << 30) - 1;
    const ull mask31 = (1ull << 31) - 1;
    const ull mask61 =M;
    vector<ull> hash,pows;
    ull base;

        // mod 2^61-1
    ull cal_mod(ull x){
        ull xu=(x>>61);
        ull xd=(x&mask61);
        ull res=xu+xd;
        if(res>=M)res-=M;
        return res;
    }

    //a*b mod 2^61-1
    ull mul(ull a,ull b){
        ull au=(a>>31),bu=(b>>31);
        ull ad=(a&mask31),bd=(b&mask31);
        ull mid=ad*bu+au*bd;
        ull midu=(mid>>30);
        ull midd=(mid&mask30);
        return cal_mod(au*bu*2+midu+(midd<<31)+ad*bd);
    }


    RollingHash(const T &a,ull base):hash(a.size()+1,0),pows(a.size()+1,1),base(base){
		for(int i = 0; i <int (a.size()); i++) {
            pows[i + 1] =mul(pows[i], base);
            hash[i + 1] =cal_mod(mul(hash[i], base) + ull(a[i]));
            if(hash[i+1]>=M)hash[i+1]-=M;
		}
    }
    ull get_hash(const T &a){
            ull res=0;
          	for(int i = 0; i <int (a.size()); i++) {
            res =cal_mod(mul(res, base) + ull(a[i]));
            if(res>=M)res-=M;
		}
            return res;
    }
    //[b1,b1+len)と[b2,b2+len)が一致するかどうか
    bool match(int b1, int b2,int len){
        ull h1 = cal_mod(hash[b1+len]+M-mul(hash[b1], pows[len]));
        ull h2 = cal_mod(hash[b2 + len]+M-mul(hash[b2],pows[len]));
        return (h1 == h2);
    }
    //[l,l+len)のハッシュ値
    ull get(int l, int len){
        return cal_mod(hash[l+len] + M - mul(hash[l], pows[len]));
    }
};
constexpr int Hash_Num=2;
struct base_t{
    int use[Hash_Num];
    int &operator[](int i){return use[i];}
    base_t(){
        mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
        for(int i=0;i<Hash_Num;i++)use[i]=rnd()%10000+26;
    }
}bases;
using ull=unsigned long long;
int main(){
      int n;
      cin>>n;
      string s;
      cin>>s;
      for(int i=0;i<n;i++){
            string t;cin>>t;
            s+=t;
            s.push_back('$');
      }
      RollingHash<string> rh(s,bases[0]);
      int m=s.size();
      V<ull> v;
      v.emplace_back((1ull<<62)-1);
      for(int i=0;i<m;i++){
            string t="";
            for(int j=0;j<4&&i+j<m;j++){
                  v.emplace_back(rh.get(i,j+1));
            }
      }
      sort(all(v));
      v.erase(unique(all(v)),v.end());
      string ans="zzzzz";
      auto calc=[&](string &tmp)->void{
                  if(ans.size()>tmp.size())ans=tmp;
                  else chmin(ans,tmp);
      };
      string tmp="";
      for(char i='a';i<='z';i++){
            tmp.push_back(i);
            ull h=rh.get_hash(tmp);
            if(*lower_bound(all(v),h)!=h)calc(tmp);
            for(char j='a';j<='z';j++){
                  tmp.push_back(j);
                  h=rh.get_hash(tmp);   
                  if(*lower_bound(all(v),h)!=h)calc(tmp);
                  for(char k='a';k<='z';k++){
                        tmp.push_back(k);
                        h=rh.get_hash(tmp);   
                        if(*lower_bound(all(v),h)!=h)calc(tmp);   
                        for(char r='a';r<='z';r++){
                              tmp.push_back(r);
                              h=rh.get_hash(tmp);   
                              if(*lower_bound(all(v),h)!=h)calc(tmp);   
                              tmp.pop_back();                             
                        }
                        tmp.pop_back();                    
                  } 
                  tmp.pop_back();           
            }
            tmp.pop_back(); 
      }
      cout<<ans<<"\n";
}
accuracy: 1
time_ms: 110
memory_kb: 29404
final_rank: 1

code_snippet: // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vvl = vector<vector<ll>>;
using vvi = vector<vector<int>>;
using vvpll = vector<vector<pll>>;
#define rep(i, a, b) for (ll i=(a); i<(b); i++)
#define rrep(i, a, b) for (ll i=(a); i>(b); i--)
#define pb push_back
#define tostr to_string
#define ALL(A) A.begin(), A.end()
#define elif else if
// constexpr ll INF = LONG_LONG_MAX;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;

const string digits = "0123456789";
const string ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
const string ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string ascii_letters = ascii_lowercase + ascii_uppercase;

template<typename T> vector<vector<T>> list2d(int N, int M, T init) { return vector<vector<T>>(N, vector<T>(M, init)); }
template<typename T> vector<vector<vector<T>>> list3d(int N, int M, int L, T init) { return vector<vector<vector<T>>>(N, vector<vector<T>>(M, vector<T>(L, init))); }
template<typename T> vector<vector<vector<vector<T>>>> list4d(int N, int M, int L, int O, T init) { return vector<vector<vector<vector<T>>>>(N, vector<vector<vector<T>>>(M, vector<vector<T>>(L, vector<T>(O, init)))); }

vector<ll> LIST(ll N) { vector<ll> A(N); rep(i, 0, N) cin >> A[i]; return A; }

void print(ld out) { cout << fixed << setprecision(15) << out << '\n'; }
void print(double out) { cout << fixed << setprecision(15) << out << '\n'; }
template<typename T> void print(T out) { cout << out << '\n'; }
template<typename T1, typename T2> void print(pair<T1, T2> out) { cout << out.first << ' ' << out.second << '\n'; }
template<typename T> void print(vector<T> A) { rep(i, 0, A.size()) { cout << A[i]; cout << (i == A.size()-1 ? '\n' : ' '); } }
template<typename T> void print(set<T> S) { vector<T> A(S.begin(), S.end()); print(A); }

void Yes() { print("Yes"); }
void No() { print("No"); }
void YES() { print("YES"); }
void NO() { print("NO"); }

ll floor(ll a, ll b) { if (a < 0) { return (a-b+1) / b; } else { return a / b; } }
ll ceil(ll a, ll b) { if (a >= 0) { return (a+b-1) / b; } else { return a / b; } }
pll divmod(ll a, ll b) { ll d = a / b; ll m = a % b; return {d, m}; }
template<typename T> bool chmax(T &x, T y) { return (y > x) ? x = y, true : false; }
template<typename T> bool chmin(T &x, T y) { return (y < x) ? x = y, true : false; }

template<typename T> T sum(vector<T> A) { T res = 0; for (T a: A) res += a; return res; }
template<typename T> T max(vector<T> A) { return *max_element(ALL(A)); }
template<typename T> T min(vector<T> A) { return *min_element(ALL(A)); }

ll toint(string s) { ll res = 0; for (char c : s) { res *= 10; res += (c - '0'); } return res; }
int toint(char num) { return num - '0'; }
char tochar(int num) { return '0' + num; }
int ord(char c) { return (int)c; }
char chr(int a) { return (char)a; }

ll pow(ll x, ll n) { ll res = 1; rep(_, 0, n) res *= x; return res; }
ll pow(ll x, ll n, int mod) { ll res = 1; while (n > 0) { if (n & 1) { res = (res * x) % mod; } x = (x * x) % mod; n >>= 1; } return res; }

int popcount(ll S) { return __builtin_popcountll(S); }
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll x, ll y) { return (x * y) / gcd(x, y); }

template<typename T> int bisect_left(vector<T> &A, T val) { return lower_bound(ALL(A), val) - A.begin(); }
template<typename T> int bisect_right(vector<T> &A, T val) { return upper_bound(ALL(A), val) - A.begin(); }

string dton(ll num, ll n, char base='0') {
    string res;
    while (abs(num) > 0) {
        ll m = num % abs(n);
        num -= m;
        res += base+m;
        num /= n;
    }
    reverse(ALL(res));
    if (res != "") {
        return res;
    } else {
        return res+base;
    }
}

string replace(string str, const string& replace, const string& with) {
    if(!replace.empty()) {
        size_t pos = 0;
        while ((pos = str.find(replace, pos)) != string::npos) {
            str.replace(pos, replace.length(), with);
            pos += with.length();
        }
    }
    return str;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;
    set<string> se;
    rep(_, 0, N) {
        string s;
        cin >> s;
        rep(d, 1, 5) {
            if (s.size() < d) break;
            rep(i, 0, s.size()-d+1) {
                se.insert(s.substr(i, d));
            }
        }
    }

    rep(n, 1, 5) {
        vector<string> v;
        auto rec = [&](auto&& f, string cur, ll i) {
            if (i == n) {
                v.pb(cur);
                return;
            }
            for (char c : ascii_lowercase) {
                f(f, cur+c, i+1);
            }
        };
        rec(rec, "", 0);
        for (auto s : v) {
            if (!se.count(s)) {
                print(s);
                return 0;
            }
        }
    }
    return 0;
}
accuracy: 1
time_ms: 380
memory_kb: 52720
final_rank: 9

code_snippet: // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vvl = vector<vector<ll>>;
using vvi = vector<vector<int>>;
using vvpll = vector<vector<pll>>;
#define rep(i, a, b) for (ll i=(a); i<(b); i++)
#define rrep(i, a, b) for (ll i=(a); i>(b); i--)
#define pb push_back
#define tostr to_string
#define ALL(A) A.begin(), A.end()
#define elif else if
// constexpr ll INF = LONG_LONG_MAX;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;

const string digits = "0123456789";
const string ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
const string ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string ascii_letters = ascii_lowercase + ascii_uppercase;

template<typename T> vector<vector<T>> list2d(int N, int M, T init) { return vector<vector<T>>(N, vector<T>(M, init)); }
template<typename T> vector<vector<vector<T>>> list3d(int N, int M, int L, T init) { return vector<vector<vector<T>>>(N, vector<vector<T>>(M, vector<T>(L, init))); }
template<typename T> vector<vector<vector<vector<T>>>> list4d(int N, int M, int L, int O, T init) { return vector<vector<vector<vector<T>>>>(N, vector<vector<vector<T>>>(M, vector<vector<T>>(L, vector<T>(O, init)))); }

vector<ll> LIST(ll N) { vector<ll> A(N); rep(i, 0, N) cin >> A[i]; return A; }

void print(ld out) { cout << fixed << setprecision(15) << out << '\n'; }
void print(double out) { cout << fixed << setprecision(15) << out << '\n'; }
template<typename T> void print(T out) { cout << out << '\n'; }
template<typename T1, typename T2> void print(pair<T1, T2> out) { cout << out.first << ' ' << out.second << '\n'; }
template<typename T> void print(vector<T> A) { rep(i, 0, A.size()) { cout << A[i]; cout << (i == A.size()-1 ? '\n' : ' '); } }
template<typename T> void print(set<T> S) { vector<T> A(S.begin(), S.end()); print(A); }

void Yes() { print("Yes"); }
void No() { print("No"); }
void YES() { print("YES"); }
void NO() { print("NO"); }

ll floor(ll a, ll b) { if (a < 0) { return (a-b+1) / b; } else { return a / b; } }
ll ceil(ll a, ll b) { if (a >= 0) { return (a+b-1) / b; } else { return a / b; } }
pll divmod(ll a, ll b) { ll d = a / b; ll m = a % b; return {d, m}; }
template<typename T> bool chmax(T &x, T y) { return (y > x) ? x = y, true : false; }
template<typename T> bool chmin(T &x, T y) { return (y < x) ? x = y, true : false; }

template<typename T> T sum(vector<T> A) { T res = 0; for (T a: A) res += a; return res; }
template<typename T> T max(vector<T> A) { return *max_element(ALL(A)); }
template<typename T> T min(vector<T> A) { return *min_element(ALL(A)); }

ll toint(string s) { ll res = 0; for (char c : s) { res *= 10; res += (c - '0'); } return res; }
int toint(char num) { return num - '0'; }
char tochar(int num) { return '0' + num; }
int ord(char c) { return (int)c; }
char chr(int a) { return (char)a; }

ll pow(ll x, ll n) { ll res = 1; rep(_, 0, n) res *= x; return res; }
ll pow(ll x, ll n, int mod) { ll res = 1; while (n > 0) { if (n & 1) { res = (res * x) % mod; } x = (x * x) % mod; n >>= 1; } return res; }

int popcount(ll S) { return __builtin_popcountll(S); }
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll x, ll y) { return (x * y) / gcd(x, y); }

template<typename T> int bisect_left(vector<T> &A, T val) { return lower_bound(ALL(A), val) - A.begin(); }
template<typename T> int bisect_right(vector<T> &A, T val) { return upper_bound(ALL(A), val) - A.begin(); }

string dton(ll num, ll n, char base='0') {
    string res;
    while (abs(num) > 0) {
        ll m = num % abs(n);
        num -= m;
        res += base+m;
        num /= n;
    }
    reverse(ALL(res));
    if (res != "") {
        return res;
    } else {
        return res+base;
    }
}

string replace(string str, const string& replace, const string& with) {
    if(!replace.empty()) {
        size_t pos = 0;
        while ((pos = str.find(replace, pos)) != string::npos) {
            str.replace(pos, replace.length(), with);
            pos += with.length();
        }
    }
    return str;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;
    set<string> se;
    rep(_, 0, N) {
        string s;
        cin >> s;
        rep(d, 1, 5) {
            if (s.size() < d) break;
            rep(i, 0, s.size()-d+1) {
                se.insert(s.substr(i, d));
            }
        }
    }

    ll d = 0;
    while (1) {
        auto ans = dton(d, 27, '`');
        ans = replace(ans, "`", "");
        if (!ans.empty()) {
            if (!se.count(ans)) {
                print(ans);
                break;
            }
        }
        d++;
    }
    return 0;
}
accuracy: 1
time_ms: 360
memory_kb: 35996
final_rank: 7

code_snippet: // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vvl = vector<vector<ll>>;
using vvi = vector<vector<int>>;
using vvpll = vector<vector<pll>>;
#define rep(i, a, b) for (ll i=(a); i<(b); i++)
#define rrep(i, a, b) for (ll i=(a); i>(b); i--)
#define pb push_back
#define tostr to_string
#define ALL(A) A.begin(), A.end()
#define elif else if
// constexpr ll INF = LONG_LONG_MAX;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;

const string digits = "0123456789";
const string ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
const string ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string ascii_letters = ascii_lowercase + ascii_uppercase;

template<typename T> vector<vector<T>> list2d(int N, int M, T init) { return vector<vector<T>>(N, vector<T>(M, init)); }
template<typename T> vector<vector<vector<T>>> list3d(int N, int M, int L, T init) { return vector<vector<vector<T>>>(N, vector<vector<T>>(M, vector<T>(L, init))); }
template<typename T> vector<vector<vector<vector<T>>>> list4d(int N, int M, int L, int O, T init) { return vector<vector<vector<vector<T>>>>(N, vector<vector<vector<T>>>(M, vector<vector<T>>(L, vector<T>(O, init)))); }

vector<ll> LIST(ll N) { vector<ll> A(N); rep(i, 0, N) cin >> A[i]; return A; }

void print(ld out) { cout << fixed << setprecision(15) << out << '\n'; }
void print(double out) { cout << fixed << setprecision(15) << out << '\n'; }
template<typename T> void print(T out) { cout << out << '\n'; }
template<typename T1, typename T2> void print(pair<T1, T2> out) { cout << out.first << ' ' << out.second << '\n'; }
template<typename T> void print(vector<T> A) { rep(i, 0, A.size()) { cout << A[i]; cout << (i == A.size()-1 ? '\n' : ' '); } }
template<typename T> void print(set<T> S) { vector<T> A(S.begin(), S.end()); print(A); }

void Yes() { print("Yes"); }
void No() { print("No"); }
void YES() { print("YES"); }
void NO() { print("NO"); }

ll floor(ll a, ll b) { if (a < 0) { return (a-b+1) / b; } else { return a / b; } }
ll ceil(ll a, ll b) { if (a >= 0) { return (a+b-1) / b; } else { return a / b; } }
pll divmod(ll a, ll b) { ll d = a / b; ll m = a % b; return {d, m}; }
template<typename T> bool chmax(T &x, T y) { return (y > x) ? x = y, true : false; }
template<typename T> bool chmin(T &x, T y) { return (y < x) ? x = y, true : false; }

template<typename T> T sum(vector<T> A) { T res = 0; for (T a: A) res += a; return res; }
template<typename T> T max(vector<T> A) { return *max_element(ALL(A)); }
template<typename T> T min(vector<T> A) { return *min_element(ALL(A)); }

ll toint(string s) { ll res = 0; for (char c : s) { res *= 10; res += (c - '0'); } return res; }
int toint(char num) { return num - '0'; }
char tochar(int num) { return '0' + num; }
int ord(char c) { return (int)c; }
char chr(int a) { return (char)a; }

ll pow(ll x, ll n) { ll res = 1; rep(_, 0, n) res *= x; return res; }
ll pow(ll x, ll n, int mod) { ll res = 1; while (n > 0) { if (n & 1) { res = (res * x) % mod; } x = (x * x) % mod; n >>= 1; } return res; }

int popcount(ll S) { return __builtin_popcountll(S); }
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll x, ll y) { return (x * y) / gcd(x, y); }

template<typename T> int bisect_left(vector<T> &A, T val) { return lower_bound(ALL(A), val) - A.begin(); }
template<typename T> int bisect_right(vector<T> &A, T val) { return upper_bound(ALL(A), val) - A.begin(); }

struct RollingHash {
    static const uint64_t mod = (1ull << 61ull) - 1;
    using uint128_t = __uint128_t;
    vector< uint64_t > power;
    const uint64_t base;

    static inline uint64_t add(uint64_t a, uint64_t b) {
        if((a += b) >= mod) a -= mod;
        return a;
    }

    static inline uint64_t mul(uint64_t a, uint64_t b) {
        uint128_t c = (uint128_t) a * b;
        return add(c >> 61, c & mod);
    }

    // 2^61-1以下の乱数を返す。これをbaseとするとHackされにくい
    static inline uint64_t generate_base() {
        mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
        uniform_int_distribution< uint64_t > rand(1, RollingHash::mod - 1);
        return rand(mt);
    }

    inline void expand(size_t sz) {
        if(power.size() < sz + 1) {
            int pre_sz = (int) power.size();
            power.resize(sz + 1);
            for(int i = pre_sz - 1; i < sz; i++) {
                power[i + 1] = mul(power[i], base);
            }
        }
    }

    // 基数baseのローリングハッシュを構築する
    explicit RollingHash(uint64_t base = generate_base()) : base(base), power{1} {}

    // 文字列sのハッシュテーブルを返す：O(n)
    vector< uint64_t > build(const string &s) const {
        int sz = s.size();
        vector< uint64_t > hashed(sz + 1);
        for(int i = 0; i < sz; i++) {
            hashed[i + 1] = add(mul(hashed[i], base), s[i]);
        }
        return hashed;
    }

    template< typename T >
    vector< uint64_t > build(const vector< T > &s) const {
        int sz = s.size();
        vector< uint64_t > hashed(sz + 1);
        for(int i = 0; i < sz; i++) {
            hashed[i + 1] = add(mul(hashed[i], base), s[i]);
        }
        return hashed;
    }

    // sの区間[l,r)のハッシュ値を返す：O(1)
    uint64_t query(const vector< uint64_t > &s, int l, int r) {
        expand(r - l);
        return add(s[r], mod - mul(s[l], power[r - l]));
    }

    // ハッシュ値h1と長さh2lenのハッシュ値h2を結合する
    uint64_t combine(uint64_t h1, uint64_t h2, size_t h2len) {
        expand(h2len);
        return add(mul(h1, power[h2len]), h2);
    }

    // ハッシュテーブルaの区間[l1,r1)と、ハッシュテーブルbの区間[l2,r2)の文字列の最長共通接頭辞の長さを返す：O(logn)
    int lcp(const vector< uint64_t > &a, int l1, int r1, const vector< uint64_t > &b, int l2, int r2) {
        int len = min(r1 - l1, r2 - l2);
        int low = 0, high = len + 1;
        while(high - low > 1) {
            int mid = (low + high) / 2;
            if(query(a, l1, l1 + mid) == query(b, l2, l2 + mid)) low = mid;
            else high = mid;
        }
        return low;
    }
};

string dton(ll num, ll n) {
    string res;
    while (abs(num) > 0) {
        ll m = num % abs(n);
        num -= m;
        res += '`'+m;
        num /= n;
    }
    reverse(ALL(res));
    if (res != "") {
        return res;
    } else {
        return "`";
    }
}

string replace(string str, const string& replace, const string& with) {
    if(!replace.empty()) {
        size_t pos = 0;
        while ((pos = str.find(replace, pos)) != string::npos) {
            str.replace(pos, replace.length(), with);
            pos += with.length();
        }
    }
    return str;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;
    RollingHash rh;
    vector<string> A(N);
    set<uint64_t> se;
    rep(_, 0, N) {
        string s;
        cin >> s;
        auto table = rh.build(s);
        rep(d, 1, 5) {
            if (s.size() < d) break;
            rep(i, 0, s.size()-d+1) {
                auto hash = rh.query(table, i, i+d);
                se.insert(hash);
            }
        }
    }

    ll d = 0;
    while (1) {
        auto ans = dton(d, 27);
        ans = replace(ans, "`", "");
        if (ans.empty()) {
            d++;
            continue;
        }
        auto s_hash = rh.query(rh.build(ans), 0, ans.size());
        if (!se.count(s_hash)) {
            print(ans);
            break;
        }
        d++;
    }
    return 0;
}
accuracy: 1
time_ms: 190
memory_kb: 26188
final_rank: 2

code_snippet: // #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vvl = vector<vector<ll>>;
using vvi = vector<vector<int>>;
using vvpll = vector<vector<pll>>;
#define rep(i, a, b) for (ll i=(a); i<(b); i++)
#define rrep(i, a, b) for (ll i=(a); i>(b); i--)
#define pb push_back
#define tostr to_string
#define ALL(A) A.begin(), A.end()
#define elif else if
// constexpr ll INF = LONG_LONG_MAX;
constexpr ll INF = 1e18;
constexpr ll MOD = 1000000007;

const string digits = "0123456789";
const string ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
const string ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string ascii_letters = ascii_lowercase + ascii_uppercase;

template<typename T> vector<vector<T>> list2d(int N, int M, T init) { return vector<vector<T>>(N, vector<T>(M, init)); }
template<typename T> vector<vector<vector<T>>> list3d(int N, int M, int L, T init) { return vector<vector<vector<T>>>(N, vector<vector<T>>(M, vector<T>(L, init))); }
template<typename T> vector<vector<vector<vector<T>>>> list4d(int N, int M, int L, int O, T init) { return vector<vector<vector<vector<T>>>>(N, vector<vector<vector<T>>>(M, vector<vector<T>>(L, vector<T>(O, init)))); }

vector<ll> LIST(ll N) { vector<ll> A(N); rep(i, 0, N) cin >> A[i]; return A; }

void print(ld out) { cout << fixed << setprecision(15) << out << '\n'; }
void print(double out) { cout << fixed << setprecision(15) << out << '\n'; }
template<typename T> void print(T out) { cout << out << '\n'; }
template<typename T1, typename T2> void print(pair<T1, T2> out) { cout << out.first << ' ' << out.second << '\n'; }
template<typename T> void print(vector<T> A) { rep(i, 0, A.size()) { cout << A[i]; cout << (i == A.size()-1 ? '\n' : ' '); } }
template<typename T> void print(set<T> S) { vector<T> A(S.begin(), S.end()); print(A); }

void Yes() { print("Yes"); }
void No() { print("No"); }
void YES() { print("YES"); }
void NO() { print("NO"); }

ll floor(ll a, ll b) { if (a < 0) { return (a-b+1) / b; } else { return a / b; } }
ll ceil(ll a, ll b) { if (a >= 0) { return (a+b-1) / b; } else { return a / b; } }
pll divmod(ll a, ll b) { ll d = a / b; ll m = a % b; return {d, m}; }
template<typename T> bool chmax(T &x, T y) { return (y > x) ? x = y, true : false; }
template<typename T> bool chmin(T &x, T y) { return (y < x) ? x = y, true : false; }

template<typename T> T sum(vector<T> A) { T res = 0; for (T a: A) res += a; return res; }
template<typename T> T max(vector<T> A) { return *max_element(ALL(A)); }
template<typename T> T min(vector<T> A) { return *min_element(ALL(A)); }

ll toint(string s) { ll res = 0; for (char c : s) { res *= 10; res += (c - '0'); } return res; }
int toint(char num) { return num - '0'; }
char tochar(int num) { return '0' + num; }
int ord(char c) { return (int)c; }
char chr(int a) { return (char)a; }

ll pow(ll x, ll n) { ll res = 1; rep(_, 0, n) res *= x; return res; }
ll pow(ll x, ll n, int mod) { ll res = 1; while (n > 0) { if (n & 1) { res = (res * x) % mod; } x = (x * x) % mod; n >>= 1; } return res; }

int popcount(ll S) { return __builtin_popcountll(S); }
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll x, ll y) { return (x * y) / gcd(x, y); }

template<typename T> int bisect_left(vector<T> &A, T val) { return lower_bound(ALL(A), val) - A.begin(); }
template<typename T> int bisect_right(vector<T> &A, T val) { return upper_bound(ALL(A), val) - A.begin(); }

struct RollingHash {
    static const uint64_t mod = (1ull << 61ull) - 1;
    using uint128_t = __uint128_t;
    vector< uint64_t > power;
    const uint64_t base;

    static inline uint64_t add(uint64_t a, uint64_t b) {
        if((a += b) >= mod) a -= mod;
        return a;
    }

    static inline uint64_t mul(uint64_t a, uint64_t b) {
        uint128_t c = (uint128_t) a * b;
        return add(c >> 61, c & mod);
    }

    // 2^61-1以下の乱数を返す。これをbaseとするとHackされにくい
    static inline uint64_t generate_base() {
        mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
        uniform_int_distribution< uint64_t > rand(1, RollingHash::mod - 1);
        return rand(mt);
    }

    inline void expand(size_t sz) {
        if(power.size() < sz + 1) {
            int pre_sz = (int) power.size();
            power.resize(sz + 1);
            for(int i = pre_sz - 1; i < sz; i++) {
                power[i + 1] = mul(power[i], base);
            }
        }
    }

    // 基数baseのローリングハッシュを構築する
    explicit RollingHash(uint64_t base = generate_base()) : base(base), power{1} {}

    // 文字列sのハッシュテーブルを返す：O(n)
    vector< uint64_t > build(const string &s) const {
        int sz = s.size();
        vector< uint64_t > hashed(sz + 1);
        for(int i = 0; i < sz; i++) {
            hashed[i + 1] = add(mul(hashed[i], base), s[i]);
        }
        return hashed;
    }

    template< typename T >
    vector< uint64_t > build(const vector< T > &s) const {
        int sz = s.size();
        vector< uint64_t > hashed(sz + 1);
        for(int i = 0; i < sz; i++) {
            hashed[i + 1] = add(mul(hashed[i], base), s[i]);
        }
        return hashed;
    }

    // sの区間[l,r)のハッシュ値を返す：O(1)
    uint64_t query(const vector< uint64_t > &s, int l, int r) {
        expand(r - l);
        return add(s[r], mod - mul(s[l], power[r - l]));
    }

    // ハッシュ値h1と長さh2lenのハッシュ値h2を結合する
    uint64_t combine(uint64_t h1, uint64_t h2, size_t h2len) {
        expand(h2len);
        return add(mul(h1, power[h2len]), h2);
    }

    // ハッシュテーブルaの区間[l1,r1)と、ハッシュテーブルbの区間[l2,r2)の文字列の最長共通接頭辞の長さを返す：O(logn)
    int lcp(const vector< uint64_t > &a, int l1, int r1, const vector< uint64_t > &b, int l2, int r2) {
        int len = min(r1 - l1, r2 - l2);
        int low = 0, high = len + 1;
        while(high - low > 1) {
            int mid = (low + high) / 2;
            if(query(a, l1, l1 + mid) == query(b, l2, l2 + mid)) low = mid;
            else high = mid;
        }
        return low;
    }
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;
    RollingHash rh;
    vector<string> A(N);
    vector<vector<uint64_t>> tables(N);
    rep(i, 0, N) {
        cin >> A[i];
        tables[i] = rh.build(A[i]);
    }

    string ans = "";
    bool ok = 0;
    while (!ok) {
        for (char c : ascii_lowercase) {
            auto s_hash = rh.query(rh.build(ans+c), 0, ans.size()+1);
            ok = 1;
            rep(i, 0, N) {
                if (A[i].size() < ans.size()) continue;
                rep(j, 0, A[i].size()-ans.size()) {
                    auto t_hash = rh.query(tables[i], j, j+ans.size()+1);
                    if (s_hash == t_hash) {
                        ok = 0;
                        break;
                    }
                }
                if (!ok) break;
            }
            if (ok) {
                ans += c;
                break;
            }
        }
        if (!ok) ans += 'a';
    }    
    print(ans);
    return 0;
}
accuracy: 0.08333333333333333
time_ms: 60
memory_kb: 6716
final_rank: 17

code_snippet: #line 2 "/home/yuruhiya/programming/library/template/template.cpp"
#include <bits/stdc++.h>
#line 4 "/home/yuruhiya/programming/library/template/constants.cpp"
#include <string_view>
#line 7 "/home/yuruhiya/programming/library/template/constants.cpp"

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rfor(i, m, n) for (int i = (m); i >= (n); --i)
#define unless(c) if (!(c))
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define range_it(a, l, r) (a).begin() + (l), (a).begin() + (r)

using namespace std;
using ll = long long;
using LD = long double;
using VB = vector<bool>;
using VVB = vector<VB>;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;
using VS = vector<string>;
using VD = vector<LD>;
using PII = pair<int, int>;
using VP = vector<PII>;
using PLL = pair<ll, ll>;
using VPL = vector<PLL>;
template <class T> using PQ = priority_queue<T>;
template <class T> using PQS = priority_queue<T, vector<T>, greater<T>>;
constexpr int inf = 1000000000;
constexpr long long inf_ll = 1000000000000000000ll, MOD = 1000000007;
constexpr long double PI = 3.14159265358979323846, EPS = 1e-12;
namespace CharacterClass {
	constexpr string_view
	    digit = "0123456789",
	    xdigit = "0123456789ABCDEFabcdef", lower = "abcdefghijklmnopqrstuvwxyz",
	    upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
	    alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
	    alnum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
	    word = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",
	    punct = R"(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~)",
	    graph =
	        R"(!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)",
	    print =
	        R"( !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)",
	    blank = " \t", space = " \t\n\r\f\v";
}  // namespace CharacterClass
#line 7 "/home/yuruhiya/programming/library/template/Input.cpp"
using namespace std;

#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#define putchar_unlocked _putchar_nolock
#define fwrite_unlocked fwrite
#define fflush_unlocked fflush
#endif
class Scanner {
	static int gc() {
		return getchar_unlocked();
	}
	static char next_char() {
		char c;
		read(c);
		return c;
	}
	template <class T> static void read(T& v) {
		cin >> v;
	}
	static void read(char& v) {
		while (isspace(v = gc()))
			;
	}
	static void read(bool& v) {
		v = next_char() != '0';
	}
	static void read(string& v) {
		v.clear();
		for (char c = next_char(); !isspace(c); c = gc()) v += c;
	}
	static void read(int& v) {
		v = 0;
		bool neg = false;
		char c = next_char();
		if (c == '-') {
			neg = true;
			c = gc();
		}
		for (; isdigit(c); c = gc()) v = v * 10 + (c - '0');
		if (neg) v = -v;
	}
	static void read(long long& v) {
		v = 0;
		bool neg = false;
		char c = next_char();
		if (c == '-') {
			neg = true;
			c = gc();
		}
		for (; isdigit(c); c = gc()) v = v * 10 + (c - '0');
		if (neg) v = -v;
	}
	static void read(double& v) {
		v = 0;
		double dp = 1;
		bool neg = false, after_dp = false;
		char c = next_char();
		if (c == '-') {
			neg = true;
			c = gc();
		}
		for (; isdigit(c) || c == '.'; c = gc()) {
			if (c == '.') {
				after_dp = true;
			} else if (after_dp) {
				v += (c - '0') * (dp *= 0.1);
			} else {
				v = v * 10 + (c - '0');
			}
		}
		if (neg) v = -v;
	}
	static void read(long double& v) {
		v = 0;
		long double dp = 1;
		bool neg = false, after_dp = false;
		char c = next_char();
		if (c == '-') {
			neg = true;
			c = gc();
		}
		for (; isdigit(c) || c == '.'; c = gc()) {
			if (c == '.') {
				after_dp = true;
			} else if (after_dp) {
				v += (c - '0') * (dp *= 0.1);
			} else {
				v = v * 10 + (c - '0');
			}
		}
		if (neg) v = -v;
	}
	template <class T, class U> static void read(pair<T, U>& v) {
		read(v.first);
		read(v.second);
	}
	template <class T> static void read(vector<T>& v) {
		for (auto& e : v) read(e);
	}
	template <size_t N = 0, class T> static void read_tuple_impl(T& v) {
		if constexpr (N < tuple_size_v<T>) {
			read(get<N>(v));
			read_tuple_impl<N + 1>(v);
		}
	}
	template <class... T> static void read(tuple<T...>& v) {
		read_tuple_impl(v);
	}
	struct ReadVectorHelper {
		size_t n;
		ReadVectorHelper(size_t _n) : n(_n) {}
		template <class T> operator vector<T>() {
			vector<T> v(n);
			read(v);
			return v;
		}
	};
	struct Read2DVectorHelper {
		size_t n, m;
		Read2DVectorHelper(const pair<size_t, size_t>& nm) : n(nm.first), m(nm.second) {}
		template <class T> operator vector<vector<T>>() {
			vector<vector<T>> v(n, vector<T>(m));
			read(v);
			return v;
		}
	};

public:
	string read_line() const {
		string v;
		for (char c = gc(); c != '\n' && c != '\0'; c = gc()) v += c;
		return v;
	}
	template <class T> T read() const {
		T v;
		read(v);
		return v;
	}
	template <class T> vector<T> read_vector(size_t n) const {
		vector<T> a(n);
		read(a);
		return a;
	}
	template <class T> operator T() const {
		return read<T>();
	}
	int operator--(int) const {
		return read<int>() - 1;
	}
	ReadVectorHelper operator[](size_t n) const {
		return ReadVectorHelper(n);
	}
	Read2DVectorHelper operator[](const pair<size_t, size_t>& nm) const {
		return Read2DVectorHelper(nm);
	}
	void operator()() const {}
	template <class H, class... T> void operator()(H&& h, T&&... t) const {
		read(h);
		operator()(forward<T>(t)...);
	}

private:
	template <template <class...> class, class...> struct Multiple;
	template <template <class...> class V, class Head, class... Tail>
	struct Multiple<V, Head, Tail...> {
		template <class... Args> using vec = V<vector<Head>, Args...>;
		using type = typename Multiple<vec, Tail...>::type;
	};
	template <template <class...> class V> struct Multiple<V> { using type = V<>; };
	template <class... T> using multiple_t = typename Multiple<tuple, T...>::type;
	template <size_t N = 0, class T> void multiple_impl(T& t) const {
		if constexpr (N < tuple_size_v<T>) {
			auto& vec = get<N>(t);
			using V = typename remove_reference_t<decltype(vec)>::value_type;
			vec.push_back(read<V>());
			multiple_impl<N + 1>(t);
		}
	}

public:
	template <class... T> auto multiple(size_t h) const {
		multiple_t<T...> result;
		while (h--) multiple_impl(result);
		return result;
	}
} in;
#define inputs(T, ...) \
	T __VA_ARGS__;     \
	in(__VA_ARGS__)
#define ini(...) inputs(int, __VA_ARGS__)
#define inl(...) inputs(long long, __VA_ARGS__)
#define ins(...) inputs(string, __VA_ARGS__)
#line 7 "/home/yuruhiya/programming/library/template/Output.cpp"
#include <charconv>
#line 10 "/home/yuruhiya/programming/library/template/Output.cpp"
using namespace std;

struct BoolStr {
	const char *t, *f;
	BoolStr(const char* _t, const char* _f) : t(_t), f(_f) {}
} Yes("Yes", "No"), yes("yes", "no"), YES("YES", "NO"), Int("1", "0");
struct DivStr {
	const char *d, *l;
	DivStr(const char* _d, const char* _l) : d(_d), l(_l) {}
} spc(" ", "\n"), no_spc("", "\n"), end_line("\n", "\n"), comma(",", "\n"),
    no_endl(" ", "");
class Output {
	BoolStr B{Yes};
	DivStr D{spc};

public:
	void put(int v) const {
		char buf[12]{};
		if (auto [ptr, e] = to_chars(begin(buf), end(buf), v); e == errc{}) {
			fwrite(buf, sizeof(char), ptr - buf, stdout);
		} else {
			assert(false);
		}
	}
	void put(long long v) const {
		char buf[21]{};
		if (auto [ptr, e] = to_chars(begin(buf), end(buf), v); e == errc{}) {
			fwrite(buf, sizeof(char), ptr - buf, stdout);
		} else {
			assert(false);
		}
	}
	void put(bool v) const {
		put(v ? B.t : B.f);
	}
	void put(vector<bool>::reference v) const {
		put(v ? B.t : B.f);
	}
	void put(char v) const {
		putchar_unlocked(v);
	}
	void put(const char* v) const {
		fwrite_unlocked(v, 1, strlen(v), stdout);
	}
	void put(double v) const {
		printf("%.20f", v);
	}
	void put(long double v) const {
		printf("%.20Lf", v);
	}
	template <class T> void put(const T& v) const {
		cout << v;
	}
	template <class T, class U> void put(const pair<T, U>& v) const {
		put(v.first);
		put(D.d);
		put(v.second);
	}
	template <class InputIterater>
	void put_range(const InputIterater& begin, const InputIterater& end) const {
		for (InputIterater i = begin; i != end; ++i) {
			if (i != begin) put(D.d);
			put(*i);
		}
	}
	template <class T> void put(const vector<T>& v) const {
		put_range(v.begin(), v.end());
	}
	template <class T, size_t N> void put(const array<T, N>& v) const {
		put_range(v.begin(), v.end());
	}
	template <class T> void put(const vector<vector<T>>& v) const {
		for (size_t i = 0; i < v.size(); ++i) {
			if (i) put(D.l);
			put(v[i]);
		}
	}

	Output() = default;
	Output(const BoolStr& _boolstr, const DivStr& _divstr) : B(_boolstr), D(_divstr) {}
	Output& operator()() {
		put(D.l);
		return *this;
	}
	template <class H> Output& operator()(H&& h) {
		put(h);
		put(D.l);
		return *this;
	}
	template <class H, class... T> Output& operator()(H&& h, T&&... t) {
		put(h);
		put(D.d);
		return operator()(forward<T>(t)...);
	}
	template <class InputIterator>
	Output& range(const InputIterator& begin, const InputIterator& end) {
		put_range(begin, end);
		put(D.l);
		return *this;
	}
	template <class T> Output& range(const T& a) {
		range(a.begin(), a.end());
		return *this;
	}
	template <class... T> void exit(T&&... t) {
		operator()(forward<T>(t)...);
		std::exit(EXIT_SUCCESS);
	}
	Output& flush() {
		fflush_unlocked(stdout);
		return *this;
	}
	Output& set(const BoolStr& b) {
		B = b;
		return *this;
	}
	Output& set(const DivStr& d) {
		D = d;
		return *this;
	}
	Output& set(const char* t, const char* f) {
		B = BoolStr(t, f);
		return *this;
	}
} out;
#line 3 "/home/yuruhiya/programming/library/template/Step.cpp"
using namespace std;

template <class T> struct Step {
	using value_type = T;

	class iterator {
		value_type a, b, c;

	public:
		constexpr iterator() : a(value_type()), b(value_type()), c(value_type()) {}
		constexpr iterator(value_type _b, value_type _c, value_type _s)
		    : a(_b), b(_c), c(_s) {}
		constexpr iterator& operator++() {
			--b;
			a += c;
			return *this;
		}
		constexpr iterator operator++(int) {
			iterator tmp = *this;
			--b;
			a += c;
			return tmp;
		}
		constexpr const value_type& operator*() const {
			return a;
		}
		constexpr const value_type* operator->() const {
			return &a;
		}
		constexpr bool operator==(const iterator& i) const {
			return b == i.b;
		}
		constexpr bool operator!=(const iterator& i) const {
			return !(b == i.b);
		}
		constexpr value_type start() const {
			return a;
		}
		constexpr value_type size() const {
			return b;
		}
		constexpr value_type step() const {
			return c;
		}
	};
	constexpr Step(value_type b, value_type c, value_type s) : be(b, c, s) {}
	constexpr iterator begin() const {
		return be;
	}
	constexpr iterator end() const {
		return en;
	}
	constexpr value_type start() const {
		return be.start();
	}
	constexpr value_type size() const {
		return be.size();
	}
	constexpr value_type step() const {
		return be.step();
	}
	constexpr value_type sum() const {
		return start() * size() + step() * (size() * (size() - 1) / 2);
	}
	operator vector<value_type>() const {
		return to_a();
	}
	auto to_a() const {
		vector<value_type> result;
		result.reserve(size());
		for (auto i : *this) {
			result.push_back(i);
		}
		return result;
	}

private:
	iterator be, en;
};
template <class T> constexpr auto step(T a) {
	return Step<T>(0, a, 1);
}
template <class T> constexpr auto step(T a, T b) {
	return Step<T>(a, b - a, 1);
}
template <class T> constexpr auto step(T a, T b, T c) {
	return Step<T>(a, a < b ? (b - a - 1) / c + 1 : 0, c);
}
#line 8 "/home/yuruhiya/programming/library/template/Ruby.cpp"
using namespace std;

template <class F> struct Callable {
	F func;
	Callable(const F& f) : func(f) {}
};
template <class T, class F> auto operator|(const T& v, const Callable<F>& c) {
	return c.func(v);
}

struct Sort_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			sort(begin(v), end(v), f);
			return v;
		});
	}
	template <class T> friend auto operator|(T v, [[maybe_unused]] const Sort_impl& c) {
		sort(begin(v), end(v));
		return v;
	}
} Sort;
struct SortBy_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			sort(begin(v), end(v),
			     [&](const auto& i, const auto& j) { return f(i) < f(j); });
			return v;
		});
	}
} SortBy;
struct RSort_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			sort(rbegin(v), rend(v), f);
			return v;
		});
	}
	template <class T> friend auto operator|(T v, [[maybe_unused]] const RSort_impl& c) {
		sort(rbegin(v), rend(v));
		return v;
	}
} RSort;
struct RSortBy_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			sort(begin(v), end(v),
			     [&](const auto& i, const auto& j) { return f(i) > f(j); });
			return v;
		});
	}
} RSortBy;
struct Reverse_impl {
	template <class T> friend auto operator|(T v, const Reverse_impl& c) {
		reverse(begin(v), end(v));
		return v;
	}
} Reverse;
struct Unique_impl {
	template <class T> friend auto operator|(T v, const Unique_impl& c) {
		v.erase(unique(begin(v), end(v), end(v)));
		return v;
	}
} Unique;
struct Uniq_impl {
	template <class T> friend auto operator|(T v, const Uniq_impl& c) {
		sort(begin(v), end(v));
		v.erase(unique(begin(v), end(v)), end(v));
		return v;
	}
} Uniq;
struct Rotate_impl {
	auto operator()(int&& left) {
		return Callable([&](auto v) {
			int s = static_cast<int>(size(v));
			assert(-s <= left && left <= s);
			if (0 <= left) {
				rotate(begin(v), begin(v) + left, end(v));
			} else {
				rotate(begin(v), end(v) + left, end(v));
			}
			return v;
		});
	}
} Rotate;
struct Max_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) { return *max_element(begin(v), end(v), f); });
	}
	template <class T> friend auto operator|(T v, const Max_impl& c) {
		return *max_element(begin(v), end(v));
	}
} Max;
struct Min_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) { return *min_element(begin(v), end(v), f); });
	}
	template <class T> friend auto operator|(T v, const Min_impl& c) {
		return *min_element(begin(v), end(v));
	}
} Min;
struct MaxPos_impl {
	template <class T> friend auto operator|(T v, const MaxPos_impl& c) {
		return max_element(begin(v), end(v)) - begin(v);
	}
} MaxPos;
struct MinPos_impl {
	template <class T> friend auto operator|(T v, const MinPos_impl& c) {
		return min_element(begin(v), end(v)) - begin(v);
	}
} MinPos;
struct MaxBy_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			auto max_it = begin(v);
			auto max_val = f(*max_it);
			for (auto it = next(begin(v)); it != end(v); ++it) {
				if (auto val = f(*it); max_val < val) {
					max_it = it;
					max_val = val;
				}
			}
			return *max_it;
		});
	}
} MaxBy;
struct MinBy_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			auto min_it = begin(v);
			auto min_val = f(*min_it);
			for (auto it = next(begin(v)); it != end(v); ++it) {
				if (auto val = f(*it); min_val > val) {
					min_it = it;
					min_val = val;
				}
			}
			return *min_it;
		});
	}
} MinBy;
struct MaxOf_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			auto max_val = f(*begin(v));
			for (auto it = next(begin(v)); it != end(v); ++it) {
				if (auto val = f(*it); max_val < val) {
					max_val = val;
				}
			}
			return max_val;
		});
	}
} MaxOf;
struct MinOf_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			auto min_val = f(*begin(v));
			for (auto it = next(begin(v)); it != end(v); ++it) {
				if (auto val = f(*it); min_val > val) {
					min_val = val;
				}
			}
			return min_val;
		});
	}
} MinOf;
struct Count_impl {
	template <class V> auto operator()(const V& val) {
		return Callable([&](auto v) { return count(begin(v), end(v), val); });
	}
} Count;
struct CountIf_impl {
	template <class F> auto operator()(const F& f) {
		return Callable([&](auto v) { return count_if(begin(v), end(v), f); });
	}
} CountIf;
struct Index_impl {
	template <class V> auto operator()(const V& val) {
		return Callable([&](auto v) -> optional<int> {
			auto result = find(begin(v), end(v), val);
			return result != end(v) ? optional(result - begin(v)) : nullopt;
		});
	}
} Index;
struct IndexIf_impl {
	template <class F> auto operator()(const F& f) {
		return Callable([&](auto v) -> optional<int> {
			auto result = find_if(begin(v), end(v), f);
			return result != end(v) ? optional(result - begin(v)) : nullopt;
		});
	}
} IndexIf;
struct FindIf_impl {
	template <class F> auto operator()(const F& f) {
		return Callable([&](auto v) -> optional<typename decltype(v)::value_type> {
			auto result = find_if(begin(v), end(v), f);
			return result != end(v) ? optional(*result) : nullopt;
		});
	}
} FindIf;
struct Sum_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			return accumulate(next(begin(v)), end(v), f(*begin(v)),
			                  [&](const auto& a, const auto& b) { return a + f(b); });
		});
	}
	template <class T> friend auto operator|(T v, const Sum_impl& c) {
		return accumulate(begin(v), end(v), typename T::value_type{});
	}
} Sum;
struct Includes {
	template <class V> auto operator()(const V& val) {
		return Callable([&](auto v) { return find(begin(v), end(v), val) != end(v); });
	}
} Includes;
struct IncludesIf_impl {
	template <class F> auto operator()(const F& f) {
		return Callable([&](auto v) { return find_if(begin(v), end(v), f) != end(v); });
	}
} IncludesIf;
struct RemoveIf_impl {
	template <class F> auto operator()(const F& f) {
		return Callable([&](auto v) {
			v.erase(remove_if(begin(v), end(v), f), end(v));
			return v;
		});
	}
} RemoveIf;
struct Each_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			for (const auto& i : v) {
				f(i);
			}
		});
	}
} Each;
struct Select_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			using value_type = typename decltype(v)::value_type;
			vector<value_type> result;
			for (const auto& i : v) {
				if (f(i)) result.push_back(i);
			}
			return result;
		});
	}
} Select;
struct Map_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			using result_type = invoke_result_t<F, typename decltype(v)::value_type>;
			vector<result_type> result;
			result.reserve(size(v));
			for (const auto& i : v) {
				result.push_back(f(i));
			}
			return result;
		});
	}
} Map;
struct Indexed_impl {
	template <class T> friend auto operator|(const T& v, Indexed_impl& c) {
		using value_type = typename T::value_type;
		vector<pair<value_type, int>> result;
		result.reserve(size(v));
		int index = 0;
		for (const auto& i : v) {
			result.emplace_back(i, index++);
		}
		return result;
	}
} Indexed;
struct AllOf_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			for (const auto& i : v) {
				if (!f(i)) return false;
			}
			return true;
		});
	}
} AllOf;
struct AnyOf_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			for (const auto& i : v) {
				if (f(i)) return true;
			}
			return false;
		});
	}
} AnyOf;
struct NoneOf_impl {
	template <class F> auto operator()(F&& f) {
		return Callable([&](auto v) {
			for (const auto& i : v) {
				if (f(i)) return false;
			}
			return true;
		});
	}
} NoneOf;

struct Tally_impl {
	template <class F> auto operator()(size_t max_val) {
		return Callable([&](auto v) {
			vector<size_t> result(max_val);
			for (const auto& i : v) {
				result[static_cast<size_t>(i)]++;
			}
			return result;
		});
	}
	template <class T, class value_type = typename T::value_type>
	friend auto operator|(const T& v, Tally_impl& c) {
		map<value_type, size_t> result;
		for (const auto& i : v) {
			result[i]++;
		}
		return result;
	}
} Tally;

template <class T> auto operator*(const vector<T>& a, size_t n) {
	T result;
	for (size_t i = 0; i < n; ++i) {
		result.insert(result.end(), a.begin(), a.end());
	}
	return result;
}
auto operator*(string a, size_t n) {
	string result;
	for (size_t i = 0; i < n; ++i) {
		result += a;
	}
	return result;
}
template <class T, class U> auto& operator<<(vector<T>& a, const U& b) {
	a.insert(a.end(), all(b));
	return a;
}
template <class T> auto& operator<<(string& a, const T& b) {
	a.insert(a.end(), all(b));
	return a;
}
template <class T, class U> auto operator+(vector<T> a, const U& b) {
	a << b;
	return a;
}
template <class T> auto operator+(string a, const T& b) {
	a << b;
	return a;
}
#line 7 "/home/yuruhiya/programming/library/template/functions.cpp"
using namespace std;

template <class T = long long> constexpr T TEN(size_t n) {
	T result = 1;
	for (size_t i = 0; i < n; ++i) result *= 10;
	return result;
}
template <class T, class U,
          enable_if_t<is_integral_v<T> && is_integral_v<U>, nullptr_t> = nullptr>
constexpr auto div_ceil(T n, U m) {
	return (n + m - 1) / m;
}
template <class T, class U> constexpr auto div_ceil2(T n, U m) {
	return div_ceil(n, m) * m;
}
template <class T> constexpr T triangle(T n) {
	return (n & 1) ? (n + 1) / 2 * n : n / 2 * (n + 1);
}
template <class T> constexpr T nC2(T n) {
	return (n & 1) ? (n - 1) / 2 * n : n / 2 * (n - 1);
}
template <class T, class U> constexpr auto middle(const T& l, const U& r) {
	return l + (r - l) / 2;
}
template <class T, class U, class V>
constexpr bool in_range(const T& v, const U& lower, const V& upper) {
	return lower <= v && v < upper;
}
template <class T, enable_if_t<is_integral_v<T>, nullptr_t> = nullptr>
constexpr bool is_square(T n) {
	T s = sqrt(n);
	return s * s == n || (s + 1) * (s + 1) == n;
}
template <class T = long long> constexpr T BIT(int b) {
	return T(1) << b;
}
template <class T, class U, enable_if_t<is_integral_v<U>, nullptr_t> = nullptr>
constexpr T Pow(T a, U n) {
	assert(n >= 0);
	T result = 1;
	while (n > 0) {
		if (n & 1) {
			result *= a;
			n--;
		} else {
			a *= a;
			n >>= 1;
		}
	}
	return result;
}
template <class T, class U, enable_if_t<is_integral_v<U>, nullptr_t> = nullptr>
constexpr T Powmod(T a, U n, T mod) {
	assert(n >= 0);
	if (a > mod) a %= mod;
	T result = 1;
	while (n > 0) {
		if (n & 1) {
			result = result * a % mod;
			n--;
		} else {
			a = a * a % mod;
			n >>= 1;
		}
	}
	return result;
}
template <class T> bool chmax(T& a, const T& b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
template <class T> bool chmin(T& a, const T& b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
template <class T> int sz(const T& v) {
	return v.size();
}
template <class T, class U> int lower_index(const T& a, const U& v) {
	return lower_bound(all(a), v) - a.begin();
}
template <class T, class U> int upper_index(const T& a, const U& v) {
	return upper_bound(all(a), v) - a.begin();
}
template <class T> auto Slice(const T& v, size_t i, size_t len) {
	return i < v.size() ? T(v.begin() + i, v.begin() + min(i + len, v.size())) : T();
}
template <class T, class U = typename T::value_type> U Gcdv(const T& v) {
	return accumulate(next(v.begin()), v.end(), U(*v.begin()), gcd<U, U>);
}
template <class T, class U = typename T::value_type> U Lcmv(const T& v) {
	return accumulate(next(v.begin()), v.end(), U(*v.begin()), lcm<U, U>);
}
namespace internal {
	template <class T, size_t N> auto make_vector(vector<int>& sizes, const T& init) {
		if constexpr (N == 1) {
			return vector(sizes[0], init);
		} else {
			int size = sizes[N - 1];
			sizes.pop_back();
			return vector(size, make_vector<T, N - 1>(sizes, init));
		}
	}
}  // namespace internal
template <class T, size_t N>
auto make_vector(const int (&sizes)[N], const T& init = T()) {
	vector s(rbegin(sizes), rend(sizes));
	return internal::make_vector<T, N>(s, init);
}
#line 9 "/home/yuruhiya/programming/library/template/template.cpp"
#if __has_include(<library/dump.hpp>)
#include <library/dump.hpp>
#define LOCAL
#else
#define dump(...) ((void)0)
#endif

template <class T> constexpr T oj_local(const T& oj, const T& local) {
#ifndef LOCAL
	return oj;
#else
	return local;
#endif
}
#line 2 "a.cpp"

int main() {
	ini(n);
	VS s = in[n];

	set<string> substr;
	rep(i, n) {
		FOR(len, 1, 5) {
			rep(l, sz(s[i]) - len + 1) {
				substr.insert(s[i].substr(l, len));
			}
		}
	}

	string str;
	auto dfs = [&](auto&& f, int len) -> void {
		if (sz(str) == len) {
			if (!substr.count(str)) {
				out.exit(str);
			}
			return;
		}
		for (char c : step('a', '{')) {
			str += c;
			f(f, len);
			str.pop_back();
		}
	};
	FOR(len, 1, 5) {
		dfs(dfs, len);
	}
}
accuracy: 1
time_ms: 340
memory_kb: 36116
final_rank: 6

code_snippet: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
using PII = pair<ll, ll>;
#define FOR(i,a,n) for(ll i=(ll)a; i<(ll)n; ++i)
#define REP(i,n) FOR(i,0,n)

int main() {
	int N;
	cin >> N;
	vector<string>s(N);
	for (auto &i : s)cin >> i;
	for (int i = 1; i <= 5; i++) {
		set<string>st;
		string t(i, 'a');
		while (t[0] <= 'z') {
			st.insert(t);
			t.back()++;
			int cnt = i - 1;
			while (cnt&&t[cnt] > 'z') {
				t[cnt--] = 'a';
				t[cnt]++;
			}
		}
		for (auto j : s) {
			for (int k = 0; k + i <= j.size(); k++) {
				string u;
				for (int l = 0; l < i; l++) {
					u.push_back(j[k + l]);
				}
				st.erase(u);
			}
		}
		if (!st.empty()) {
			cout << *st.begin() << endl;
			return 0;
		}
	}
}
accuracy: 1
time_ms: 630
memory_kb: 50632
final_rank: 13

code_snippet: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
using PII = pair<ll, ll>;
#define FOR(i,a,n) for(ll i=(ll)a; i<(ll)n; ++i)
#define REP(i,n) FOR(i,0,n)

int main() {
	int N;
	cin >> N;
	vector<string>s(N);
	for (auto &i : s)cin >> i;
	for (int i = 1; i <= 5; i++) {
		set<string>st;
		string t(i, 'a');
		while (t[0] <= 'z') {
			st.insert(t);
			t.back()++;
			int cnt = i - 1;
			while (cnt&&t[cnt] > 'z') {
				t[cnt--] = 'a';
				t[cnt]++;
			}
		}
		for (auto j : s) {
			for (int k = 0; k + i <= j.size(); k++) {
				string u;
				for (int l = 0; l < i; l++) {
					u.push_back(j[k + l]);
				}
				st.erase(u);
			}
		}
		if (!st.empty()) {
			cout << *st.begin() << endl;
			return 0;
		}
	}
}
accuracy: 1
time_ms: 630
memory_kb: 50620
final_rank: 12

code_snippet: #include <bits/stdc++.h>

using namespace std;

#define int long long
// #define double long double
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for(ll i = (a); i > (b); --i)
#define REP(i, n) for(ll i = 0; i < (n); ++i)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOREACH(x, a) for(auto &(x) : (a))
#define VECCIN(x)                                                              \
    for(auto &youso_ : (x)) cin >> youso_
#define bitcnt(x) __builtin_popcount(x)
#define lbit(x) __builtin_ffsll(x)
#define rbit(x) __builtin_clzll(x)
#define SZ(x) ((ll)(x).size())
#define fi first
#define se second
#define All(a) (a).begin(), (a).end()
#define rAll(a) (a).rbegin(), (a).rend()

template <typename T = long long> inline T IN() {
    T x;
    cin >> x;
    return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail) {
    cin >> head;
    CIN(move(tail)...);
}
#define CCIN(...)                                                              \
    char __VA_ARGS__;                                                          \
    CIN(__VA_ARGS__)
#define DCIN(...)                                                              \
    double __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define LCIN(...)                                                              \
    ll __VA_ARGS__;                                                            \
    CIN(__VA_ARGS__)
#define SCIN(...)                                                              \
    string __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"
#define Printv(v)                                                              \
    {                                                                          \
        FOREACH(x, v) { cout << x << " "; }                                    \
        cout << "\n";                                                          \
    }
template <typename T = string> inline void eputs(T s) {
    cout << s << "\n";
    exit(0);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *)array, (T *)(array + N), val);
}

template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using PQ = priority_queue<T>;

typedef long long ll;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<ll, ll> PL;
typedef vector<PL> VPL;
typedef vector<bool> VB;
typedef vector<double> VD;
typedef vector<string> VS;

const int INF = 1e9;
const int MOD = 1e9 + 7;
// const int MOD = 998244353;
const ll LINF = 5e18;
// const double PI = atan(1.0) * 4.0;
const ll dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
#define PI 3.141592653589793238

// ローリングハッシュ
// 二分探索で LCP を求める機能つき
struct RollingHash {
    static const int base1 = 1007, base2 = 2009;
    static const int mod1 = 1000000007, mod2 = 1000000009;
    vector<long long> hash1, hash2, power1, power2;

    // construct
    RollingHash(const string &S) {
        int n = (int)S.size();
        hash1.assign(n + 1, 0);
        hash2.assign(n + 1, 0);
        power1.assign(n + 1, 1);
        power2.assign(n + 1, 1);
        for(int i = 0; i < n; ++i) {
            hash1[i + 1] = (hash1[i] * base1 + S[i]) % mod1;
            hash2[i + 1] = (hash2[i] * base2 + S[i]) % mod2;
            power1[i + 1] = (power1[i] * base1) % mod1;
            power2[i + 1] = (power2[i] * base2) % mod2;
        }
    }

    // get hash of S[left:right]
    inline pair<long long, long long> get(int l, int r) const {
        long long res1 = hash1[r] - hash1[l] * power1[r - l] % mod1;
        if(res1 < 0) res1 += mod1;
        long long res2 = hash2[r] - hash2[l] * power2[r - l] % mod2;
        if(res2 < 0) res2 += mod2;
        return {res1, res2};
    }

    // get lcp of S[a:] and T[b:]
    inline int getLCP(int a, int b) const {
        int len = min((int)hash1.size() - a, (int)hash1.size() - b);
        int low = 0, high = len;
        while(high - low > 1) {
            int mid = (low + high) >> 1;
            if(get(a, a + mid) != get(b, b + mid))
                high = mid;
            else
                low = mid;
        }
        return low;
    }
};

bool inc(int l, string &s) {
    for(int i = l - 1; i >= 0; --i) {
        if(s[i] != 'z') {
            s[i]++;
            return true;
        }
        s[i] = 'a';
    }
    return false;
}

signed main() {
    LCIN(N);
    set<string> st;
    REP(i, N) {
        SCIN(S);
        REP(j, S.length()) {
            FOR(len, 1, 5) {
                if(j + len > S.length()) continue;
                st.emplace(S.substr(j, len));
            }
        }
    }
    REP(i, 27) REP(j, 27) REP(k, 27) REP(l, 26) {
        string t;
        if(i) t += 'a' - 1 + i;
        if(j) t += 'a' - 1 + j;
        if(k) t += 'a' - 1 + k;
        t += 'a' + l;
        if(!st.count(t)) eputs(t);
    }
}
accuracy: 1
time_ms: 520
memory_kb: 42472
final_rank: 10

code_snippet: #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <cstring>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vec;
typedef vector<vec> mat;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n-1); i >= 0; i--)
#define pb push_back
#define f first
#define s second
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll max3(ll a, ll b, ll c){return max(a, max(b, c));};
ll min3(ll a, ll b, ll c){return min(a, min(b, c));};
ll max4(ll a, ll b, ll c, ll d){return max(max(a, b), min(c, d));};
ll min4(ll a, ll b, ll c, ll d){return min(min(a, b), min(c, d));};
ll max5(ll a, ll b, ll c, ll d, ll e){return max(max(a, b), max3(c, d, e));};
ll min5(ll a, ll b, ll c, ll d, ll e){return min(min(a, b), min3(c, d, e));};

const ll INFL = 1LL << 60;//10^18 = 2^60
const int INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;
vector<ll> dy = {0, 0, 1, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, -1, 0, 0, 1, -1, 1, -1, 0};

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}
ll pow_mod(ll x, ll k){
  x %= MOD; x += MOD; x %= MOD;
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};

ll kai_mod(ll x){
  if(x == 0) return 1;
  return x * kai_mod(x-1) % MOD;
}

/*
//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}
*/

int main(){
  ll N;
  cin >> N;
  set<pair<ll, ll>> hashList;
  ll base = 998244353;
  rep(i, N){
    string S;
    cin >> S;
    ll sl = S.size();
    for(ll i = 1; i <= 5; i++){
      ll hash = 0;
      rep(j, i) hash = (hash * base + S[j]) % MOD;
      hashList.insert({i, hash});
      ll power = pow_mod(base, i);
      rep(j, sl-i){
        hash = ((hash * base - S[j] * power + S[i+j]) % MOD + MOD) % MOD;
        hashList.insert({i, hash});
      }
    }
  }
  for(ll i = 1;;i++){
    rep(j, pow_long(26, i)){
      vector<ll> x(i);
      ll J = j;
      rep(k, i){
        x[k] = J % 26;
        J /= 26;
      }
      reverse(x.begin(), x.end());
      string P = "";
      ll hashP = 0;
      rep(k, i){
        P += 'a' + x[k];
        hashP = (hashP * base + x[k] + 'a') % MOD;
      }
      if(hashList.count({i, hashP})) continue;
      cout << P << endl;
      return 0;
    }
  }
}
accuracy: 1
time_ms: 530
memory_kb: 54204
final_rank: 11

code_snippet: #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <cstring>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vec;
typedef vector<vec> mat;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n-1); i >= 0; i--)
#define pb push_back
#define f first
#define s second
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll max3(ll a, ll b, ll c){return max(a, max(b, c));};
ll min3(ll a, ll b, ll c){return min(a, min(b, c));};
ll max4(ll a, ll b, ll c, ll d){return max(max(a, b), min(c, d));};
ll min4(ll a, ll b, ll c, ll d){return min(min(a, b), min(c, d));};
ll max5(ll a, ll b, ll c, ll d, ll e){return max(max(a, b), max3(c, d, e));};
ll min5(ll a, ll b, ll c, ll d, ll e){return min(min(a, b), min3(c, d, e));};

const ll INFL = 1LL << 60;//10^18 = 2^60
const int INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;
vector<ll> dy = {0, 0, 1, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, -1, 0, 0, 1, -1, 1, -1, 0};

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}
ll pow_mod(ll x, ll k){
  x %= MOD; x += MOD; x %= MOD;
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};

ll kai_mod(ll x){
  if(x == 0) return 1;
  return x * kai_mod(x-1) % MOD;
}

/*
//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}
*/

int main(){
  ll N;
  cin >> N;
  set<pair<ll, ll>> hashList;
  ll base = 998244353;
  rep(i, N){
    string S;
    cin >> S;
    ll sl = S.size();
    for(ll i = 1; i <= 5; i++){
      ll hash = 0;
      rep(j, i) hash = (hash * base + S[j]) % MOD;
      hashList.insert({i, hash});
      ll power = pow_mod(base, i);
      rep(j, sl-i){
        hash = ((hash * base - S[j] * power + S[i+j]) % MOD + MOD) % MOD;
        hashList.insert({i, hash});
      }
    }
  }
  for(ll i = 1;;i++){
    rep(j, pow_long(26, i)){
      ll J = j;
      string P = "";
      ll hashP = 0;
      rep(k, i){
        P += 'a' + (J % 26);
        hashP = (hashP * base + (J % 26) + 'a') % MOD;
        J /= 26;
      }
      if(hashList.count({i, hashP})) continue;
      cout << P << endl;
      return 0;
    }
  }
}
accuracy: 0.08333333333333333
time_ms: 390
memory_kb: 53896
final_rank: 19

code_snippet: #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <cstring>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vec;
typedef vector<vec> mat;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n-1); i >= 0; i--)
#define pb push_back
#define f first
#define s second
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll max3(ll a, ll b, ll c){return max(a, max(b, c));};
ll min3(ll a, ll b, ll c){return min(a, min(b, c));};
ll max4(ll a, ll b, ll c, ll d){return max(max(a, b), min(c, d));};
ll min4(ll a, ll b, ll c, ll d){return min(min(a, b), min(c, d));};
ll max5(ll a, ll b, ll c, ll d, ll e){return max(max(a, b), max3(c, d, e));};
ll min5(ll a, ll b, ll c, ll d, ll e){return min(min(a, b), min3(c, d, e));};

const ll INFL = 1LL << 60;//10^18 = 2^60
const int INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;
vector<ll> dy = {0, 0, 1, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, -1, 0, 0, 1, -1, 1, -1, 0};

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}
ll pow_mod(ll x, ll k){
  x %= MOD; x += MOD; x %= MOD;
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};

ll kai_mod(ll x){
  if(x == 0) return 1;
  return x * kai_mod(x-1) % MOD;
}

/*
//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}
*/

int main(){
  ll N;
  cin >> N;
  set<pair<ll, ll>> hashList;
  ll base = 9973;
  rep(i, N){
    string S;
    cin >> S;
    ll sl = S.size();
    for(ll i = 1; i <= 5; i++){
      ll hash = 0;
      rep(j, i) hash = (hash * base + S[j]) % MOD;
      hashList.insert({i, hash});
      ll power = pow_mod(base, i);
      rep(j, sl-i){
        hash = (hash * base - S[j] * power + S[i+j] + MOD) % MOD;
        hashList.insert({i, hash});
      }
    }
  }
  for(ll i = 1;;i++){
    rep(j, pow_long(26, i)){
      ll J = j;
      string P = "";
      ll hashP = 0;
      rep(k, i){
        P += 'a' + (J % 26);
        hashP = (hashP * base + (J % 26) + 'a') % MOD;
        J /= 26;
      }
      if(hashList.count({i, hashP})) continue;
      cout << P << endl;
      return 0;
    }
  }
}
accuracy: 0.08333333333333333
time_ms: 330
memory_kb: 53952
final_rank: 18