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

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;

#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define test() int t;cin>>t;for(int test=1;test<=t;test++)
#define pb push_back
#define nl cout<<"\n"
#define all(x) x.begin(),x.end()

template<class C> void min_self( C &a, C b ){ a = min(a,b); }
template<class C> void max_self( C &a, C b ){ a = max(a,b); }

const ll MOD = 1000000007;
ll mod( ll n, ll m=MOD ){ n%=m,n+=m,n%=m;return n; }

const int MAXN = 1e5+5;
const int LOGN = 21;
const ll INF = 1e14;
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};

template<class T1, class T2> void add( T1 &x, T2 y, ll m = MOD )
{
    x += y;
    if( x >= m )
        x -= m;
}

template<class T1, class T2> void sub( T1 &x, T2 y, ll m = MOD )
{
    x -= y;
    if( x < 0 )
        x += m;
}

ld dp[102][102][102];
int vis[102][102][102];
ld solve( int a, int b, int c )
{
    if( a == 100 || b == 100 || c == 100 )
        return 0;

    if( vis[a][b][c] != 0 )
        return dp[a][b][c];

    vis[a][b][c] = 1;
    ld go = 1.0/(a+b+c);

    ld ans = 1;

    ans += (1.0*a*go) * solve(a+1,b,c);
    ans += (1.0*b*go) * solve(a,b+1,c);
    ans += (1.0*c*go) * solve(a,b,c+1);

    return dp[a][b][c] = ans;
}

int main() 
{
    #ifdef gupta_samarth
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    fastio();

    memset(vis,0,sizeof(vis));

    int a,b,c;
    cin>>a>>b>>c;
    cout<<fixed<<setprecision(9)<<solve(a,b,c);    

    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}

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

typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define range(a) a.begin(), a.end()
#define endl "\n"
#define Yes() cout << "Yes" << endl
#define No() cout << "No" << endl
#define MP make_pair
using P = pair<int, int>;
const long long INF = 1LL<<60;
void chmin(long long &a, long long b) { if (a > b) a = b; }
void chmax(long long &a, long long b) { if (a < b) a = b; }

const int64_t CYCLES_PER_SEC = 2800000000;

struct Timer {
	int64_t start;
	Timer() { reset(); }
	void reset() { start = getCycle(); }
	void plus(double a) { start -= (a * CYCLES_PER_SEC); }
	inline double get() { return (double)(getCycle() - start) / CYCLES_PER_SEC; }
	inline int64_t getCycle() {
		uint32_t low, high;
		__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
		return ((int64_t)low) | ((int64_t)high << 32);
	}
};

Timer timer;

unsigned long xor128() {
	static unsigned long x = 123456789, y = 362436069, z = 521288629, w = 88675123;
	unsigned long t = (x^(x << 11));
	x = y;
	y = z;
	z = w;
	return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}

// 0以上1未満の小数をとる乱数
static double rand01(){
	double ans = ((xor128() + 0.5)  * (1.0 / 9223372036854775807));
	return ans / 2;
}

int main(void){
	ios::sync_with_stdio(0);
	cin.tie(0);
	timer.reset();
	double TIMELIMIT = 2.8;
	//double ti = timer.get();
	int N, M;
	cin >> N >> M;
	map<int, vector<string>> mp;
	vector<vector<char>> ans(N, vector<char>(20, '.'));
	int nowx = 0, nowy = 0;
	set<int> length;
	FOR(i,0,M){
		string s;
		cin >> s;
		mp[(int)s.size()].push_back(s);
		length.insert((int)s.size());
	}

	for (auto itr = length.begin(); itr != length.end(); itr++){
		FOR(i,0,(int)mp[*itr].size()){
			string s = mp[*itr][i];
			if(nowx >= N-1 && nowy + *itr >= N){
				char c = 'A';
				for(auto x: ans){
					for(auto y: x){
						if(y == '.')	cout << c++;
						else	cout << y;
						if(c == 'I')	c = 'A';
					}
					cout << endl;
				}
				return 0;
			}
			FOR(k,0,(int)s.size()){
				if(nowy >= 20){nowy = 0; nowx++;}
				ans[nowx][nowy++] = s[k];
			}
		}
	}


		return 0;
}

