#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<cctype>
using namespace std;

template <typename T>
inline void read(T&x){
    x=0; char temp=getchar(); bool f=false;
    while(!isdigit(temp)){if(temp=='-') f=true; temp=getchar();}
    while(isdigit(temp)){x=(x<<1)+(x<<3)+temp-'0'; temp=getchar();}
    if(f) x=-x;
}
template <typename T>
void print(T x){
    if(x<0) putchar('-'),x=-x;
    if(x>9) print(x/10);
    putchar(x%10+'0');
}

typedef long long ll;
const int MAXN = 105;
const ll mod = 998244353;

inline ll Add(ll x,ll y){return x+y>=mod? x+y-mod:x+y;}

//basic
int n,w[MAXN],pre[MAXN],sum,aim;
ll fac[MAXN];

//DP
ll f[MAXN][MAXN][MAXN*MAXN];

inline ll DP(){
    f[0][0][0]=1;
    for(register int i=1;i<=n;i++)
        for(register int j=0;j<=i;j++)
            for(register int k=0;k<=pre[i];k++){
                int x=k,y=pre[i]-k,now=w[i];
                if(j>0&&x-now>=0) f[i][j][x]=Add(f[i][j][x],f[i-1][j-1][x-now]);
                if(y-now>=0) f[i][j][x]=Add(f[i][j][x],f[i-1][j][x]);
            }
    ll res=0;
    for(register int i=0;i<=n;i++) res=Add(res,fac[i]*fac[n-i]%mod*f[n][i][aim]%mod);
    return res;
}

int main(){
    read(n),fac[0]=1;
    for(register int i=1;i<=n;i++) read(w[i]),sum+=w[i],pre[i]=pre[i-1]+w[i],fac[i]=fac[i-1]*i%mod;
    if(sum&1) return puts("0"),0;
    aim=sum>>1;
    print(DP());
    return 0;
}
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long ll;

ll a, b, k;
const int n = 35;
vector<vector<ll>> dp(n + 2, vector<ll>(n + 2));

string findkth(int i, int j, ll x) {
	if (i == 0) return string(j, 'b');
	if (j == 0) return string(i, 'a');
	if (x <= dp[i - 1][j]) return "a" + findkth(i - 1, j, x);
	return "b" + findkth(i, j - 1, x - dp[i - 1][j]);
}

int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> a >> b >> k;

	dp[0][0] = 1;

	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= n; j++) {
			if (i > 0) dp[i][j] += dp[i - 1][j];
			if (j > 0) dp[i][j] += dp[i][j - 1];
		}
	}
	cout << findkth(a, b, k) << endl;

	return 0;
}