/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aurinegro (Nicolás Álvarez)
 */

#include <bits/stdc++.h>

using namespace std;

#define forn(i, n) for(int i=0;i<(int)(n);i++)
#define si(c) ((int)(c).size())
#define pb push_back

using ll = long long int;
using vi = vector<int>;
using pii = pair<int, int>;


class DChoosingUpSides {
public:
    void solve(std::istream &cin, std::ostream &cout) {
        int n;
        cin >> n;
        vector<bitset<256>> ans;
        bitset<256> x = 3;
        ans.pb(2);
        for (int lvl = 2; lvl <= n; lvl++) {
            for (auto &x : ans) x |= x << (1 << (lvl - 1));
            int sz = si(ans);
            forn (i, sz) ans.pb(ans[i] ^ (x << (1 << (lvl - 1))));
            ans.pb(x);
            x |= x << (1 << (lvl - 1));
        }
        cout << si(ans) << endl;
        for (auto x : ans) {
            forn(i, 1 << n) cout << char('A' + x[i]);
            cout << endl;
        }
    }
};


int main() {
    DChoosingUpSides solver;
    std::istream &in(std::cin);
    std::ostream &out(std::cout);
    solver.solve(in, out);
    return 0;
}

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

typedef long long ll;
typedef vector<ll> vint;
typedef vector< vector<ll> > vvint;

#define rep(i,n) for(ll i=0;i<n;i++)
#define repf(i,f,n) for(ll i=f;i<n;i++)
#define repr(i,n) for(ll i=n-1;i>=0;i--)
#define mp make_pair
#define mt make_tuple
#define ALL(obj) (obj).begin(), (obj).end()
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 (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 0, 1, -1, 1, -1, -1, 1};
int dx[]={1, -1, 0, 0, 1, 1, -1, -1};


int main() {
    cout<<fixed<<setprecision(10);

    ll n; cin>>n;
    vint x(n); rep(i,n) cin>>x[i];

    ll a1 = 0;
    double a2 = 0;
    ll a3 = 0;
    for(auto e:x){
        a1 += abs(e);
        a2 += e*e;
        chmax(a3, abs(e));
    }
    cout<<a1<<endl;
    a2 = sqrt(a2);
    cout<<a2<<endl;
    cout<<a3<<endl;


    return 0;

}