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

#define Int register int
#define mod 998244353
#define MAXN 105

template <typename T> void read (T &x){char c = getchar ();x = 0;int f = 1;while (c < '0' || c > '9') f = (c == '-' ? -1 : 1),c = getchar ();while (c >= '0' && c <= '9') x = x * 10 + c - '0',c = getchar ();x *= f;}
template <typename T,typename ... Args> void read (T &x,Args& ... args){read (x),read (args...);}
template <typename T> void write (T x){if (x < 0) x = -x,putchar ('-');if (x > 9) write (x / 10);putchar (x % 10 + '0');}
template <typename T> void chkmax (T &a,T b){a = max (a,b);}
template <typename T> void chkmin (T &a,T b){a = min (a,b);}

int mul (int a,int b){return 1ll * a * b % mod;}
int dec (int a,int b){return a >= b ? a - b : a + mod - b;}
int add (int a,int b){return a + b >= mod ? a + b - mod : a + b;}
void Add (int &a,int b){a = add (a,b);}

int n,W[MAXN],fac[MAXN],f[MAXN][MAXN][MAXN * MAXN / 2];

signed main(){
	read (n);int up = 0;
	for (Int i = 1;i <= n;++ i) read (W[i]),up += W[i];
	if (up & 1) return puts ("0") & 0;
	f[0][0][0] = fac[0] = 1,up >>= 1;
	for (Int i = 1;i <= n;++ i) fac[i] = mul (fac[i - 1],i);
	for (Int i = 0;i < n;++ i)
		for (Int s = 0;s <= i;++ s)
			for (Int w = 0;w <= up;++ w){
				Add (f[i + 1][s][w],f[i][s][w]);
				if (w + W[i + 1] <= up) Add (f[i + 1][s + 1][w + W[i + 1]],f[i][s][w]);
			}
	int ans = 0;
	for (Int i = 0;i <= n;++ i) ans = add (ans,mul (mul (fac[i],fac[n - i]),f[n][i][up]));
	write (ans),putchar ('\n'); 
	return 0;
}
#include "bits/stdc++.h"
using namespace std;

#ifdef Dragon
#include"debug.cpp"
#else
#define                         deb //
#define                         pr  //
#endif

#define int               		long long
#define lld               		long double
#define pb                		push_back
#define vi                		vector<int>
#define si(x)             		(int)(x.size())
#define all(c)            		(c).begin(), (c).end()
#define uniq(x)           		(x).erase(unique(all(x)),(x).end())
#define pii               		pair<int,int>
#define ss                		second
#define ff                		first
#define FOR(x,a)          		for(auto&x :a)
#define rep(i,a,b)        		for(int i=a;i<b;i++)
#define repd(i,a,b)             for(int i=a;i>=b;i--)
#define pnr(a)                  FOR(i,a){cout<<i<<" ";}cout<<"\n";

#define endl '\n'
const long long inf = 1e18;
const int32_t mod = 1000000007;

const int N = 3e5 + 5;

int solve() {

	int a , b , k;
	cin >> a >> b >> k;
	int bb = b;
	int aa = a;
	vector<int> v(bb , 0);
	k--;

	rep(i , 0 , bb) {

		int cnt = 0;
		int cur = 1;
		int sum = 1;
		int moved = 0;

		while (k >= sum) {
			if (moved == a)
				break;
			moved++;

			cur *= (b + cnt);
			cur /= (cnt + 1);

			if (cur + sum > k)
				break;
			sum += cur;
			cnt++;
		}
		// deb(sum);
		a = moved;
		// deb(moved);
		v[i] = moved;
		k -= sum;
		b--;
	}
	// pnr(v);
	vector<int> ans( (aa + bb) , 0);
	int cnt = 0;
	rep(i , 0 , bb) {
		ans[aa - v[i] + cnt] = 1;
		cnt++;
	}
	// pnr(ans);
	FOR(i , ans) {
		cout << char('a' + i) << "";
	}
	cout << endl;



	return 0;

}

signed main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	// cout << fixed << setprecision(20);
#ifdef Dragon
	freopen("in.txt", "r", stdin);
	auto start1 = chrono::high_resolution_clock::now();
	//freopen("out.txt","w",stdout);
#endif

	int tests = 1;
	//cin>>tests;
	for (int i = 1 ; i <= tests ; i++) {
		solve();
	}

	return 0 ;
}
