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

typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define sz(x) int(x.size())
const int INF = 1001001001;
const ll mod = 1000000007;
const ll INFL = 1001001001001001000;


int main() {
    int n; cin >> n;
    ll x[n]; rep(i,n) cin >> x[i];
    ll md = 0; rep(i,n) md += abs(x[i]);
    ll cd = 0; rep(i,n) cd = max(cd, abs(x[i]));
    double ed = 0; rep(i,n) ed += (long double) x[i] * x[i];
    ed = sqrt(ed);
    cout << md << endl;
    cout << setprecision(15) << ed << endl;
    cout << cd << endl;
    
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sz(a) int(a.size())
template <typename A, typename B>
ostream& operator <<(ostream& out, const pair<A, B>& a) { out << "(" << a.first << "," << a.second << ")"; return out; }
template <typename T, size_t N> ostream& operator <<(ostream& out, const array<T, N>& a) { out << "["; bool first = true; for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]"; return out; }
template <typename T> ostream& operator <<(ostream& out, const vector<T>& a) { out << "["; bool first = true; for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]"; return out; }
template <typename T, class Cmp> ostream& operator <<(ostream& out, const set<T, Cmp>& a) { out << "{"; bool first = true; for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "}"; return out; }
template <typename U, typename T, class Cmp> ostream& operator <<(ostream& out, const map<U, T, Cmp>& a) { out << "{"; bool first = true; for (auto& p : a) { out << (first ? "" : ", "); out << p.first << ":" << p.second; first = 0;} out << "}"; return out; }
template <typename Arg1> void __f(const char* name, Arg1&& arg1){ cerr << name << ": " << arg1 << endl; }
template <typename Arg1, typename... Args> void __f(const char* names, Arg1&& arg1, Args&&... args){ const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << ": " << arg1 << " |"; __f(comma + 1, args...); }

#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif

void solve() {
	int n; cin >> n;
	vector<string> s(n);
	for(int i=0; i<n; i++) {
		cin >> s[i];
	}
	unordered_map<string, int> m;
	for(int i=0; i<n; i++) {
		auto ss = s[i];
		if(ss[0] == '!') {
			ss = ss.substr(1);
			m[ss] |= 1;
		} else {
			m[ss] |= 2;
		}
		if(m[ss] == 3) {
			cout << ss << endl;
			return;
		}
	}
	cout << "satisfiable" << endl;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	solve();
	return 0;
}

