#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

int mymax(int *p, int n)
{
	if(p == NULL)
		return -1;
	int max = p[0];
	for(int i = 1; i < n; i++)
	{
		max = max > p[i] ? max : p[i];
	}
	return max;
}

bool IfExistGraph(vector<int> *pvec, int n, int k)
{
	if(pvec == NULL)
		return false;
	if(pvec[0].size() > 1)
		return false;
	int iPreNum = pvec[0].size();
	int iCurNum;
	for(int i = 1; i < n; i++)
	{
		int iCurNum = pvec[i].size();
		if(iCurNum  == 0 || iCurNum / (float)iPreNum > k)
			return false;
		iPreNum = iCurNum;
	}
	return true;
}

void main()
{
	int n, k;
	int *d;
	int i;

	scanf("%d%d",&n, &k);
	d = (int *)malloc(sizeof(int) * n);

	for(i = 0; i < n; i++)
		scanf("%d", d + i);

	int max = mymax(d, n) + 1;	//��������

	vector<int> * vecInstanceNode = new vector<int>[max];

	for(i = 0; i < n; i++)
		vecInstanceNode[d[i]].push_back(i + 1);

	//�ж��Ƿ���������
	bool bExist = IfExistGraph(vecInstanceNode, max, k);
	if (!bExist)
		printf("-1\n");
	else
	{
		for (i = 1; i < max; i++)
		{
			int iPreIndex = 0;
			int kk = k;
			for(int iCurIndex = 0; iCurIndex < vecInstanceNode[i].size(); iCurIndex++)
			{
				printf("%d %d\n", vecInstanceNode[i-1][iPreIndex], vecInstanceNode[i][iCurIndex]);
				kk--;
				if (kk == 0)
				{
					iPreIndex++;
					kk = k;
				}
			}
		}
	}

	free(d);
	delete [] vecInstanceNode;
}


#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

int mymax(int *p, int n)
{
	if(p == NULL)
		return -1;
	int max = p[0];
	for(int i = 1; i < n; i++)
	{
		max = max > p[i] ? max : p[i];
	}
	return max;
}

bool IfExistGraph(vector<int> *pvec, int n, int k)
{
	if(pvec == NULL)
		return false;
	if(pvec[0].size() > 1)
		return false;
	int iPreNum = pvec[0].size();
	int iCurNum;
	for(int i = 1; i < n; i++)
	{
		int iCurNum = pvec[i].size();
		if(iCurNum  == 0 || iCurNum / (float)iPreNum > k)
			return false;
		iPreNum = iCurNum;
	}
	return true;
}

void main()
{
	int n, k;
	int *d;
	int i;

	scanf("%d%d",&n, &k);
	d = (int *)malloc(sizeof(int) * n);

	for(i = 0; i < n; i++)
		scanf("%d", d + i);

	int max = mymax(d, n) + 1;	//��������

	vector<int> * vecInstanceNode = new vector<int>[max];

	for(i = 0; i < n; i++)
		vecInstanceNode[d[i]].push_back(i + 1);

	//�ж��Ƿ���������
	bool bExist = IfExistGraph(vecInstanceNode, max, k);
	if (!bExist)
		printf("-1\n");
	else
	{
		printf("%d\n", n - 1);
		for (i = 1; i < max; i++)
		{
			int iPreIndex = 0;
			int kk = k;
			for(int iCurIndex = 0; iCurIndex < vecInstanceNode[i].size(); iCurIndex++)
			{
				printf("%d %d\n", vecInstanceNode[i-1][iPreIndex], vecInstanceNode[i][iCurIndex]);
				kk--;
				if (kk == 0)
				{
					iPreIndex++;
					kk = k;
				}
			}
		}
	}

	free(d);
	delete [] vecInstanceNode;
	getchar();
	getchar();
}


#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;

int mymax(int *p, int n)
{
	if(p == NULL)
		return -1;
	int max = p[0];
	for(int i = 1; i < n; i++)
	{
		max = max > p[i] ? max : p[i];
	}
	return max;
}

bool IfExistGraph(vector<int> *pvec, int n, int k)
{
	if(pvec == NULL)
		return false;
	if(pvec[0].size() > 1)
		return false;
	int iCurNum, iNextNum;
	for(int i = 0; i < n - 1; i++)
	{
		iCurNum = pvec[i].size();
		iNextNum = pvec[i + 1].size();
		if(i == 0)
		{
			if(iCurNum  == 0 || (iNextNum) / (float)iCurNum > k)
				return false;
		}
		else
		{
			if(iCurNum  == 0 || (iCurNum + iNextNum) / (float)iCurNum > k)
				return false;
		}
	}
	return true;
}

void main()
{
	int n, k;
	int *d;
	int i;

	scanf("%d%d",&n, &k);
	d = (int *)malloc(sizeof(int) * n);

	for(i = 0; i < n; i++)
		scanf("%d", d + i);

	int max = mymax(d, n) + 1;	//��������

	vector<int> * vecInstanceNode = new vector<int>[max];

	for(i = 0; i < n; i++)
		vecInstanceNode[d[i]].push_back(i + 1);

	//�ж��Ƿ���������
	bool bExist = IfExistGraph(vecInstanceNode, max, k);
	if (!bExist)
		printf("-1\n");
	else
	{
		printf("%d\n", n - 1);
		for (i = 1; i < max; i++)
		{
			int iPreIndex = 0;
			if(i == 1)
			{
				for(int iCurIndex = 0; iCurIndex < vecInstanceNode[i].size(); iCurIndex++)
					printf("%d %d\n", vecInstanceNode[i-1][iPreIndex], vecInstanceNode[i][iCurIndex]);
			}
			else
			{
				int kk = k - 1;
				for(int iCurIndex = 0; iCurIndex < vecInstanceNode[i].size(); iCurIndex++)
				{
					printf("%d %d\n", vecInstanceNode[i-1][iPreIndex], vecInstanceNode[i][iCurIndex]);
					kk--;
					if (kk == 0)
					{
						iPreIndex++;
						kk = k - 1;
					}
				}
			}
		}
	}

	free(d);
	delete [] vecInstanceNode;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,k;
	cin >> n >> k;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first){
			cout << -1;
			return 0;
		}
		num = (int)((i->second.size()+curr.size()-1)/curr.size());
		added=0;
		for(int k=0; k<curr.size() && added<i->second.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num  && added<i->second.size(); ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				while(added<i->second.size()){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >k){
			cout << -1;
			return 0;
		}
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,K;
	cin >> n >> K;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first || !curr.size() || !i->second.size()){
			cout << -1;
			return 0;
		}
		num = (int)(1.*i->second.size()/curr.size() + 0.5);
		added=0;
		for(int k=0; k<curr.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num; ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				for(int p=0; p<i->second.size() - num*(curr.size()-1); ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	int visited=1;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				visited++;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >K){
			cout << -1;
			return 0;
		}
	}
	if(visited!=n  || res.size() > 1000000){
		cout << -1;
		return 0;
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,k;
	cin >> n >> k;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first){
			cout << -1;
			return 0;
		}
		num = (int)((i->second.size()+0.5)/curr.size());
		added=0;
		for(int k=0; k<curr.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num; ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				while(added!=i->second.size()){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >k){
			cout << -1;
			return 0;
		}
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,k;
	cin >> n >> k;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first){
			cout << -1;
			return 0;
		}
		num = (int)((i->second.size())/curr.size());
		added=0;
		for(int k=0; k<curr.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num; ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				while(added!=i->second.size()){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >k){
			cout << -1;
			return 0;
		}
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,k;
	cin >> n >> k;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first){
			cout << -1;
			return 0;
		}
		num = (int)((i->second.size()+1)/curr.size());
		added=0;
		for(int k=0; k<curr.size() && added<i->second.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num  && added<i->second.size(); ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				while(added<i->second.size()){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >k){
			cout << -1;
			return 0;
		}
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <math.h>
#include <hash_set>
#include <algorithm>
#include <map>
#include <set>
#include <conio.h>
#include <stack>

#define _USE_MATH_DEFINES
#define TASK "secure"

using namespace std;

int main(){
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	//freopen(TASK ".in", "r", stdin);freopen(TASK ".out", "w", stdout);

	int n,k;
	cin >> n >> k;
	vector<int>di(n);
	map<int,vector<int>>mm;
	for(int i=0; i<n; ++i){
		scanf("%d", &di[i]);
		mm[di[i]].push_back(i);
	}
	vector<vector<int>>g(n);
	map<int,vector<int>>::iterator i = mm.begin();
	if(i->first!=0 || (i->first==0 && i->second.size() != 1)){
		cout << -1;
		return 0;
	}
	int last = i->first;
	vector<int>curr = i->second;
	i++;
	int num;
	int added;
	vector<pair<int,int>>res;
	for(; i!=mm.end(); ++i){
		if(last+1 != i->first){
			cout << -1;
			return 0;
		}
		num = (int)((i->second.size()+curr.size()-1)/curr.size());
		added=0;
		for(int k=0; k<curr.size(); ++k){
			if(k!=curr.size()-1){
				for(int p=0; p<num; ++p){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
			else{
				while(added!=i->second.size()){
					res.push_back(make_pair(curr[k],i->second[added]));
					g[curr[k]].push_back(i->second[added++]);
				}
			}
		}
		curr = i->second;
		last = i->first;
	}
	queue<int>q;
	vector<int>d(n);
	vector<int>used(n);
	int fr,to;
	fr = mm.begin()->second[0];
	q.push(fr);
	while(!q.empty()){
		fr = q.front();
		q.pop();
		for(int i=0; i<g[fr].size(); ++i){
			to = g[fr][i];
			if(!used[to]){
				used[to]=1;
				d[to] = d[fr]+1;
				q.push(to);
			}
		}
	}
	for(int i=0; i<n; ++i){
		if(d[i]!=di[i] || g[i].size() >k){
			cout << -1;
			return 0;
		}
	}
	cout << res.size() << endl;
	for(int i=0; i<res.size(); ++i){
		printf("%d %d\n", res[i].first+1, res[i].second+1);
	}
	return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int cnt[10001];

int main() {
    int n ;
    scanf("%d", &n);
    int *a = new int[n];
    int total = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d", a + i);
        total += a[i];
        ++cnt[a[i]];
    }
    if (n == 2) {
        if ((a[0] + a[1]) % 2 == 1) printf("Unrecoverable configuration.");
        else if (a[0] == a[1]) printf("Exemplary pages.");
        else {
            int diff = abs(a[0] - a[1]);
            if (diff % 2)  printf("Unrecoverable configuration.");
            else printf("%d ml. from cup #%d to cup #%d.", diff >>1, 1 + max_element(a, a + n) - a, 1 +  min_element(a, a + n) - a);
        }
        return 0;
    }
    int MAX = 0;
    for (int i = 0 ; i <10001; ++i) MAX = max(MAX, cnt[i]);
    if (MAX == n){
        printf("Exemplary pages.");
    } else if (MAX + 2 < n){
        printf("Unrecoverable configuration.");
    }
    else {
        int l = -1, r = -1;
        for (int  i = 0; i < 10001; ++i) {
            if (cnt[i] == 1) {
                if (l == -1) l = i; else r = i;
            }
        }
        if (l == 1 || r == -1) {
            printf("Unrecoverable configuration.");
        }
        else {
            if ((total - l - r) % (n - 2) != 0 || (total - l - r) /(n - 2) * 2 != l + r) {
                printf("Unrecoverable configuration.");
            }
            int A = -1, B = -1;
            for (int i =0;  i < n; ++i){ if (a[i] == l) A = i; if (a[i] == r) B = i;}
            printf("%d ml. from cup #%d to cup #%d.", abs(l - r) / 2, A + 1, B + 1);
        }

    }

    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int cnt[10001];

int main() {
    int n ;
    scanf("%d", &n);
    int *a = new int[n];
    int total = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d", a + i);
        total += a[i];
        ++cnt[a[i]];
    }
    if (n == 2) {
        if ((a[0] + a[1]) % 2 == 1) printf("Unrecoverable configuration.");
        else if (a[0] == a[1]) printf("Exemplary pages.");
        else {
            int diff = abs(a[0] - a[1]);
            if (diff % 2)  printf("Unrecoverable configuration.");
            else printf("%d ml. from cup #%d to cup #%d.", diff >>1, 1 + min_element(a, a + n) - a, 1 +  max_element(a, a + n) - a);
        }
        return 0;
    }
    int MAX = 0;
    for (int i = 0 ; i <10001; ++i) MAX = max(MAX, cnt[i]);
    if (MAX == n){
        printf("Exemplary pages.");
    } else if (MAX + 2 < n){
        printf("Unrecoverable configuration.");
    }
    else {
        int l = -1, r = -1;
        for (int  i = 0; i < 10001; ++i) {
            if (cnt[i] == 1) {
                if (l == -1) l = i; else r = i;
            }
        }
        if (l == 1 || r == -1) {
            printf("Unrecoverable configuration.");
        }
        else {
            if ((total - l - r) % (n - 2) != 0 || (total - l - r) /(n - 2) * 2 != l + r) {
                printf("Unrecoverable configuration.");
            }
            int A = -1, B = -1;
            for (int i =0;  i < n; ++i){ if (a[i] == l) A = i; if (a[i] == r) B = i;}
            printf("%d ml. from cup #%d to cup #%d.", abs(l - r) / 2, A + 1, B + 1);
        }

    }

    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int cnt[10001];

int main() {
    int n ;
    scanf("%d", &n);
    int *a = new int[n];
    int total = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d", a + i);
        total += a[i];
        ++cnt[a[i]];
    }
    if (n == 2) {
        if ((a[0] + a[1]) % 2 == 1) printf("Unrecoverable configuration.");
        else if (a[0] == a[1]) printf("Exemplary pages.");
        else {
            int diff = abs(a[0] - a[1]);
            if (diff % 2)  printf("Unrecoverable configuration.");
            else printf("%d ml. from cup #%d to cup #%d.", diff >>1, 1 + min_element(a, a + n) - a, 1 +  max_element(a, a + n) - a);
        }
        return 0;
    }
    int MAX = 0;
    for (int i = 0 ; i <10001; ++i) MAX = max(MAX, cnt[i]);
    if (MAX == n){
        printf("Exemplary pages.");
    } else if (MAX + 2 < n){
        printf("Unrecoverable configuration.");
    }
    else {
        int l = -1, r = -1;
        for (int  i = 0; i < 10001; ++i) {
            if (cnt[i] == 1) {
                if (l == -1) l = i; else r = i;
            }
        }
        if (l == 1 || r == -1) {
            printf("Unrecoverable configuration.");
        }
        else {
            if ((total - l - r) % (n - 2) != 0 || (total - l - r) /(n - 2) * 2 != l + r) {
                printf("Unrecoverable configuration.");
                return 0;
            }
            int A = -1, B = -1;
            for (int i =0;  i < n; ++i){ if (a[i] == l) A = i; if (a[i] == r) B = i;}
            printf("%d ml. from cup #%d to cup #%d.", abs(l - r) / 2, A + 1, B + 1);
        }

    }

    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
using namespace std;
int cnt[10001];
int main() {
    int n ;
    scanf("%d", &n);
    int *a = new int[n];
    int total = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d", a + i);
        total += a[i];
        ++cnt[a[i]];
    }
    int MAX = 0;
    for (int i = 0 ; i <10001; ++i) MAX = max(MAX, cnt[i]);
    if (MAX == n){
        printf("Exemplary pages.");
    } else if (MAX + 2 < n){
        printf("Unrecoverable configuration.");
    }
    else {
        int l = -1, r = -1;
        for (int  i = 0; i < 10001; ++i) {
            if (cnt[i] == 1) {
                if (l == -1) l = i; else r = i;
            }
        }
        if (l == 1 || r == -1) {
            printf("Unrecoverable configuration.");
        }
        else {
            if ((total - l - r) % (n - 2) != 0 || (total - l - r) /(n - 2) * 2 != l + r) {
                printf("Unrecoverable configuration.");
            }
            int A = -1, B = -1;
            for (int i =0;  i < n; ++i){ if (a[i] == l) A = i; if (a[i] == r) B = i;}
            printf("%d ml. from cup #%d to cup #%d.", abs(l - r) / 2, A + 1, B + 1);
        }

    }

    return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>

#define MaxN 1001
using namespace std;

string str, s1;
int n, a[MaxN], b[MaxN], sum, d;
bool check = 0;
void OpenFiles(){
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}
void ReadSomeData(){
	//OpenFiles();
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		b[i] = a[i];
		sum += a[i];
	}
	sum /= n;
}
void SolveThisProblemSuccessfully(){
	for (int i = 0; i < n; i++){
		if (a[i] == sum){
			d++;
		}
	}

	sort(&a[0], &a[n]);

	if ((d < n - 2) || (abs(sum - a[0]) != abs(sum - a[n - 1]))){
		cout << "Unrecoverable configuration.";
	} else

	if ((d != n)){
		cout << abs(sum - a[0]) << " ml. from cup #";
		for (int i = 0; i < n; i++){
			if (b[i] < sum){
				cout << i + 1;
				break;
			}
		}
		cout << " to cup #";
		for (int i = 0; i < n; i++){
			if (b[i] > sum){
				cout << i + 1;
				break;
			}
			cout << ".";
		}
	} else
		cout << "Exemplary pages.";
}
int main(){
	ReadSomeData();
	SolveThisProblemSuccessfully();
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>

#define MaxN 1001
using namespace std;

string str, s1;
int n, a[MaxN], b[MaxN], sum, d;
bool check = 0;
void OpenFiles(){
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
}
void ReadSomeData(){
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		b[i] = a[i];
		sum += a[i];
	}
	sum /= n;
}
void SolveThisProblemSuccessfully(){
	for (int i = 0; i < n; i++){
		if (a[i] == sum){
			d++;
		}
	}

	sort(&a[0], &a[n]);

	if ((d < n - 2) || (abs(sum - a[0]) != abs(sum - a[n - 1]))){
		cout << "Unrecoverable configuration.";
	} else

	if ((d != n)){
		cout << abs(sum - a[0]) << " ml. from cup #";
		for (int i = 0; i < n; i++){
			if (b[i] < sum){
				cout << i + 1;
				break;
			}
		}
		cout << " to cup #";
		for (int i = 0; i < n; i++){
			if (b[i] > sum){
				cout << i + 1;
				break;
			}
		}
		cout << ".";
	} else
		cout << "Exemplary pages.";
}
int main(){
//	OpenFiles();
	ReadSomeData();
	SolveThisProblemSuccessfully();
	return 0;
}


#include <cstring>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <vector>
#include <set>
#include <complex>
#include <list>
#include <climits>
#include <cctype>
#include <bitset>
//#include <windows.h>

using namespace std;

#define pb push_back
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define sz(v) ((int)v.size())
#define rep(i,m) for(int i=0;i<(int)(m);i++)
#define rep2(i,n,m) for(int i=n;i<(int)(m);i++)
#define For(it,c) for(__typeof(c.begin()) it=c.begin();it!=c.end();++it)
#define mem(a,b) memset(a,b,sizeof(a))
#define mp make_pair
#define dot(a,b) ((conj(a)*(b)).X)
#define X real()
#define Y imag()
#define length(V) (hypot((V).X,(V).Y))
#define vect(a,b) ((b)-(a))
#define cross(a,b) ((conj(a)*(b)).imag())
#define normalize(v) ((v)/length(v))
#define rotate(p,about,theta) ((p-about)*exp(point(0,theta))+about)
#define pointEqu(a,b) (comp(a.X,b.X)==0 && comp(a.Y,b.Y)==0)
#define clrq(x) while(!x.empty()) x.pop();
#define clrvv(v) rep(i,sz(v))v[i].clear();

typedef stringstream ss;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<string> vs;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vector<int> > vii;
typedef long double ld;
typedef complex<double> point;
typedef pair<point, point> segment;
typedef pair<double, point> circle;
typedef vector<point> polygon;

const int oo = (int) 1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
int main(){
	int n, arr[1010];
	cin >> n;

	rep(i,n) cin >> arr[i];

	int sum = 0, cupval;
	rep(i, n) sum+=arr[i];
	if(sum%n!=0){
		cout << "Unrecoverable configuration." << endl;
		return 0;
	}
	cupval = sum/n;
	int diffcnt = 0, low, high;
	rep(i,n){
		if(arr[i] < cupval) diffcnt++, low=i;
		if(arr[i] > cupval) diffcnt++, high=i;
	}
	if(diffcnt == 0){
		cout << "Exemplary pages." << endl;
		return 0;
	}
	if(diffcnt != 2){
		cout << "Unrecoverable configuration." << endl;
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n", cupval-arr[low], low+1, high+1);
	return 0;
}


// B. Help Chef Gerasim.cpp : Defines the entry point for the console application.

#include <iostream>

using namespace std;
int a[1010];
int main()
{
    int n;
    cin >> n;
    long long sum = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        sum += a[i];
    }
    if((sum / n) * n != sum)
        cout << "Unrecoverable configuration." << endl;
    else
    {
        int count = 0;
        for (int i = 0; i < n; i++)
            if(a[i] == sum / n)
                count++;
        if(count == n)
            cout << "Exemplary pages." << endl;
        else
        {
            for (int i = 0; i < n; i++)
                a[i] = a[i] - sum / n;
            bool flag = false, flag2 = false;
            int index = 0;
            int counter = 0;
            int index2 = 0;
            while(flag2 != true)
            {
                if(a[index2] > 0 && flag == false)
                {
                    counter = a[index2];
                    a[index2] = 0;
                    index = index2;
                    flag = true;
                }
                if(a[index2] < 0 && flag == true)
                {
                    if(counter <= -a[index2])
                    {
                        a[index2] += counter;
                        cout << counter << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        counter = 0;
                    }
                    else {
                        counter += a[index2];
                        cout << -a[index2] << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        a[index2] -= a[index2];
                    }
                }
                if (counter == 0)
                    flag = false;
                int count = 0;
                for (int k = 0; k < n; k++)
                    if(a[k] < 0)
                    {
                        flag2 = false;
                        break;
                    }else if(a[k] == 0) count++;
                if(count == n)
                    flag2 = true;
                index2++;
                if(index2 == n)
                {
                    index2 = 0;
                    if (flag2 == false)
                    {
                        cout << "Unrecoverable configuration." << endl;
                        return 0;
                    }
                }
            }
        }
    }
}


// B. Help Chef Gerasim.cpp : Defines the entry point for the console application.

#include <iostream>

using namespace std;
int a[1010];
int main()
{
    int n;
    cin >> n;
    long long sum = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        sum += a[i];
    }
    if((sum / n) * n != sum)
        cout << "Unrecoverable configuration." << endl;
    else
    {
        int count = 0;
        for (int i = 0; i < n; i++)
        {
            if(a[i] - (sum / n) > 0)
                count++;
        }
        if(count > 1)
        {
            cout << "Unrecoverable configuration." << endl;
            return 0;
        }
        count = 0;
        for (int i = 0; i < n; i++)
            if(a[i] == sum / n)
                count++;
        if(count == n)
            cout << "Exemplary pages." << endl;
        else
        {
            for (int i = 0; i < n; i++)
                a[i] = a[i] - sum / n;
            bool flag = false, flag2 = false;
            int index = 0;
            int counter = 0;
            int index2 = 0;
            while(flag2 != true)
            {
                if(a[index2] > 0 && flag == false)
                {
                    counter = a[index2];
                    a[index2] = 0;
                    index = index2;
                    flag = true;
                }
                if(a[index2] < 0 && flag == true)
                {
                    if(counter <= -a[index2])
                    {
                        a[index2] += counter;
                        cout << counter << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        counter = 0;
                    }
                    else {
                        counter += a[index2];
                        cout << -a[index2] << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        a[index2] -= a[index2];
                    }
                }
                if (counter == 0)
                    flag = false;
                int count = 0;
                for (int k = 0; k < n; k++)
                    if(a[k] < 0)
                    {
                        flag2 = false;
                        break;
                    }else count++;
                if(count == n)
                    flag2 = true;
                index2++;
                if(index2 == n)
                    index2 = 0;
            }
        }
    }
}


// B. Help Chef Gerasim.cpp : Defines the entry point for the console application.

#include <iostream>

using namespace std;
int a[1010];
int main()
{
    int n;
    cin >> n;
    long long sum = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        sum += a[i];
    }
    if((sum / n) * n != sum)
        cout << "Unrecoverable configuration." << endl;
    else
    {
        int count = 0;
        for (int i = 0; i < n; i++)
            if(a[i] == sum / n)
                count++;
        if(count == n)
            cout << "Exemplary pages." << endl;
        else
        {
            for (int i = 0; i < n; i++)
                a[i] = a[i] - sum / n;
            bool flag = false, flag2 = false;
            int index = 0;
            int counter = 0;
            int index2 = 0;
            while(flag2 != true)
            {
                if(a[index2] > 0 && flag == false)
                {
                    counter = a[index2];
                    a[index2] = 0;
                    index = index2;
                    flag = true;
                }
                if(a[index2] < 0 && flag == true)
                {
                    if(counter <= -a[index2])
                    {
                        a[index2] += counter;
                        cout << counter << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        counter = 0;
                    }
                    else {
                        counter += a[index2];
                        cout << -a[index2] << " ml. from cup #" << index2 + 1 << " to cup #" << index + 1 << '.' << endl;
                        a[index2] -= a[index2];
                    }
                }
                if (counter == 0)
                    flag = false;
                int count = 0;
                for (int k = 0; k < n; k++)
                    if(a[k] < 0)
                    {
                        flag2 = false;
                        break;
                    }else count++;
                if(count == n)
                    flag2 = true;
                index2++;
                if(index2 == n)
                    index2 = 0;
            }
        }
    }
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	int d=(*mx-*mn)/2;
	int a=distance(c.begin(),mn)+1;
	int b=distance(c.begin(),mx)+1;
	*mx-=d;
	*mn+=d;
	for (int i=0;i<n;++i)
		if (c[i]!=c[i+1])
		{
			cout<<"Unrecoverable configuration."<<endl;
			return 0;
		}
	cout<<d<<" ml. from cup #"<<a<<" to cup #"<<b<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	vector <int> cc;
	cc.reserve(n);
	for (vector <int>::iterator it=c.begin();it!=c.end();++it)
		if ((it!=mx)&&(it!=mn)) cc.push_back(*it);
	for (int i=0;i<cc.size()-1;++i)
		if (cc[i]!=cc[i+1])
		{
			cout<<"Unrecoverable configuration."<<endl;
			return 0;
		}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int> cc=c;
	sort(cc.begin(),cc.end());
	int k=0;
	for (int i=0;i<n-1;++i)
		if (cc[i]!=cc[i+1])
		{
			//cout<<i<<" "<<i+1<<endl;
			++k;
			if (k>2)
			{
				cout<<"Exemplary pages."<<endl;
				return 0;
			}
		}
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	vector <int> cc;
	cc.reserve(n);
	for (vector <int>::iterator it=c.begin();it!=c.end();++it)
		if ((it!=mx)&&(it!=mn)) cc.push_back(*it);
	//for (int i=0;i<cc.size();++i)
		//cout<<cc[i]<<endl;
	for (int i=0;i<(int)cc.size()-1;++i)
		if (cc[i]!=cc[i+1])
		{
			cout<<"Unrecoverable configuration."<<endl;
			return 0;
		}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	int d=(*mx-*mn)/2;
	int a=distance(c.begin(),mn)+1;
	int b=distance(c.begin(),mx)+1;
	*mx-=d;
	*mn+=d;
	for (int i=0;i<n-1;++i)
		if (c[i]!=c[i+1])
		{
			cout<<"Unrecoverable configuration."<<endl;
			return 0;
		}
	cout<<d<<" ml. from cup #"<<a<<" to cup #"<<b<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	sort(c.begin(),c.end());
	int k=0;
	for (int i=0;i<n-1;++i)
		if (c[i]!=c[i+1])
		{
			++k;
			if (k>2)
			{
				cout<<"Exemplary pages."<<endl;
				return 0;
			}
		}
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	if ((*mx-*mn)%2>0)
	{
		cout<<"Unrecoverable configuration."<<endl;
		return 0;
	}
	vector <int> cc;
	cc.reserve(n);
	for (vector <int>::iterator it=c.begin();it!=c.end();++it)
		if ((it!=mx)&&(it!=mn)) cc.push_back(*it);
	//for (int i=0;i<cc.size();++i)
		//cout<<cc[i]<<endl;
	for (int i=0;i<(int)cc.size()-1;++i)
		if (cc[i]!=cc[i+1])
		{
			cout<<"Unrecoverable configuration."<<endl;
			return 0;
		}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main()
{
	int n;
	cin>>n;
	vector <int> c(n);
	for (int i=0;i<n;++i)
		cin>>c[i];
	vector <int>::iterator mx=max_element(c.begin(),c.end());
	vector <int>::iterator mn=min_element(c.begin(),c.end());
	if (*mx==*mn)
	{
		cout<<"Exemplary pages."<<endl;
		return 0;
	}
	cout<<(*mx-*mn)/2<<" ml. from cup #"<<distance(c.begin(),mn)+1<<" to cup #"<<distance(c.begin(),mx)+1<<"."<<endl;
	return 0;
}


// �������� ������ ��������.cpp: ���������� ����� ����� ��� ����������� ����������.
//

//#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
#include <string.h>

int main()
{
	int n;
	scanf("%d",&n);
	int i,j,k;
	int a[1000]={0};
	int h,l;
	int index;
	int index2;
	int ave=0;
	int s=0,t=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		ave+=a[i];
	}
	ave=ave/n;
	bool eq=true;;
	for(i=0;i<n;i++)
	{
		if(a[i]!=ave)
		{
			eq=false;
			if(a[i]>ave)
			{
				h=a[i]-ave;
				index=i;
				s++;
			}
			else
			{
				l=a[i]-ave;
				index2=i;
				t++;
			}
		}
	}
	if(eq)
	{
		puts("Exemplary pages.");
	}
	else if(/*ave%n!=0 ||*/ s>1 || t>1)
	{
		puts("Unrecoverable configuration.");
	}
	else
	{
		if(h==l*(-1))
		{
			printf("%d ml. from cup #%d to cup #%d.",h,index2+1,index+1);
		}
		else
		{
			puts("Unrecoverable configuration.");
		}
	}
	//getch();
	return 0;
}


// �������� ������ ��������.cpp: ���������� ����� ����� ��� ����������� ����������.
//

//#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
#include <string.h>

int main()
{
	int n;
	scanf("%d",&n);
	int i,j,k;
	int a[1000]={0};
	int h,l;
	int index;
	int index2;
	int ave=0;
	int s=0,t=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		ave+=a[i];
	}
	ave=ave/n;
	bool eq=true;;
	for(i=0;i<n;i++)
	{
		if(a[i]!=ave)
		{
			eq=false;
			if(a[i]>ave)
			{
				h=a[i]-ave;
				index=i;
				s++;
			}
			else
			{
				l=a[i]-ave;
				index2=i;
				t++;
			}
		}
	}
	if(eq)
	{
		puts("Exemplary pages.");
	}
	else if(ave%n!=0 || s>1 || t>1)
	{
		puts("Unrecoverable configuration.");
	}
	else
	{
		if(h==l*(-1))
		{
			printf("%d ml. from cup #%d to cup #%d.",h,index2+1,index+1);
		}
		else
		{
			puts("Unrecoverable configuration.");
		}
	}
	//getch();
	return 0;
}


// �������� ������ ��������.cpp: ���������� ����� ����� ��� ����������� ����������.
//

//#include "stdafx.h"
#include <conio.h>
#include <stdio.h>
#include <string.h>

int main()
{
	int n;
	scanf("%d",&n);
	int i,j,k;
	int a[1000]={0};
	int h,l;
	int index;
	int index2;
	int ave=0;
	int s=0,t=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		ave+=a[i];
	}
	ave=ave/n;
	bool eq=true;;
	for(i=0;i<n;i++)
	{
		if(a[i]!=ave)
		{
			eq=false;
			if(a[i]>ave)
			{
				h=a[i]-ave;
				index=i;
				s++;
			}
			else
			{
				l=a[i]-ave;
				index2=i;
				t++;
			}
		}
	}
	if(eq)
	{
		puts("Exemplary pages.");
	}
	else if(ave%n!=0 || s>1 || t>1)
	{
		puts("Unrecoverable configuration.");
	}
	else
	{
		if(h==l*(-1))
		{
			printf("%d ml. from cup #%d to cup #%d.",h,index2+1,index+1);
		}
	}
	//getch();
	return 0;
}


// CodeForces.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
//#include <sstream>
#include <set>
#include <vector>

using namespace std;

int main()
{
	int num,q;
	vector<int> qs;
	set<int> universe;
	///////////////////////
	cin >> num;
	qs.reserve(num);
	for (int i = 0; i < num; i++)
	{
		cin >> q;
		qs.push_back(q);
		universe.insert(q);
	}
	if (universe.size() == 1)
	{
		cout << "Exemplary pages.";
	}
	else if (universe.size() == 3)
	{
		int min_q = *universe.begin();
		int max_q = *(--universe.end());
		int spilled = (max_q - min_q)/2;
		int from = -1;
		int to = -1;
		for (int i = 0; i < qs.size(); i++)
		{
			if (qs[i] == min_q)
			{
				if (from == -1)
				{
					from = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
			else if (qs[i] == max_q)
			{
				if (to == -1)
				{
					to = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
		}
		cout << spilled << " ml. from cup #" << from + 1 << " to cup #" << to + 1;
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	////////////////////////////////////////////////////////////////////////////
	return 0;
}


// CodeForces.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
//#include <sstream>
#include <set>
#include <vector>

using namespace std;

int main()
{
	int num,q;
	vector<int> qs;
	set<int> universe;
	///////////////////////
	cin >> num;
	qs.reserve(num);
	for (int i = 0; i < num; i++)
	{
		cin >> q;
		qs.push_back(q);
		universe.insert(q);
	}
	if (universe.size() == 1)
	{
		cout << "Exemplary pages.";
		return 0;
	}
	else if (universe.size() == 3)
	{
		int min_q = *universe.begin();
		int max_q = *(--universe.end());
		int norm_q = *(++universe.begin());
		int spilled = (max_q - min_q)/2;
		if ((min_q + spilled != norm_q) || (max_q - spilled != norm_q))
		{
			cout << "Unrecoverable configuration.";
			return 0;
		}
		int from = -1;
		int to = -1;
		for (int i = 0; i < qs.size(); i++)
		{
			if (qs[i] == min_q)
			{
				if (from == -1)
				{
					from = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
			else if (qs[i] == max_q)
			{
				if (to == -1)
				{
					to = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
		}
		cout << spilled << " ml. from cup #" << from + 1 << " to cup #" << to + 1 << ".";
		return 0;
	}
	else
	{
		cout << "Unrecoverable configuration.";
		return 0 ;
	}
}


// CodeForces.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
//#include <sstream>
#include <set>
#include <vector>

using namespace std;

int main()
{
	int num,q;
	vector<int> qs;
	set<int> universe;
	///////////////////////
	cin >> num;
	qs.reserve(num);
	for (int i = 0; i < num; i++)
	{
		cin >> q;
		qs.push_back(q);
		universe.insert(q);
	}
	if (universe.size() == 1)
	{
		cout << "Exemplary pages.";
		return 0;
	}
	else if (universe.size() == 3)
	{
		int min_q = *universe.begin();
		int max_q = *(--universe.end());
		int norm_q = *(++universe.begin());
		int spilled = (max_q - min_q)/2;
		if ((min_q + spilled != norm_q) || (max_q - spilled != norm_q))
		{
			cout << "Unrecoverable configuration.";
			return 0;
		}
		int from = -1;
		int to = -1;
		for (int i = 0; i < qs.size(); i++)
		{
			if (qs[i] == min_q)
			{
				if (from == -1)
				{
					from = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
			else if (qs[i] == max_q)
			{
				if (to == -1)
				{
					to = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
		}
		cout << spilled << " ml. from cup #" << from + 1 << " to cup #" << to + 1 << ".";
		return 0;
	}
	else
	{
		cout << "Unrecoverable configuration.";
		return 0 ;
	}
}


// CodeForces.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
//#include <sstream>
#include <set>
#include <vector>

using namespace std;

int main()
{
	int num,q;
	vector<int> qs;
	set<int> universe;
	///////////////////////
	cin >> num;
	qs.reserve(num);
	for (int i = 0; i < num; i++)
	{
		cin >> q;
		qs.push_back(q);
		universe.insert(q);
	}
	if (universe.size() == 1)
	{
		cout << "Exemplary pages.";
	}
	else if (universe.size() == 3)
	{
		int min_q = *universe.begin();
		int max_q = *(--universe.end());
		int spilled = (max_q - min_q)/2;
		int from = -1;
		int to = -1;
		for (int i = 0; i < qs.size(); i++)
		{
			if (qs[i] == min_q)
			{
				if (from == -1)
				{
					from = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
			else if (qs[i] == max_q)
			{
				if (to == -1)
				{
					to = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
		}
		cout << spilled << " ml. from cup #" << from + 1 << " to cup #" << to + 1 << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	////////////////////////////////////////////////////////////////////////////
	return 0;
}


// CodeForces.cpp : Defines the entry point for the console application.
//
//#include "stdafx.h"
#include <iostream>
//#include <sstream>
#include <set>
#include <vector>

using namespace std;

int main()
{
	int num,q;
	vector<int> qs;
	set<int> universe;
	///////////////////////
	cin >> num;
	qs.reserve(num);
	for (int i = 0; i < num; i++)
	{
		cin >> q;
		qs.push_back(q);
		universe.insert(q);
	}
	int min_q = *universe.begin();
	int max_q = *(--universe.end());
	int spilled = (max_q - min_q)/2;
	///////////////////////
	if (universe.size() == 1)
	{
		cout << "Exemplary pages.";
		return 0;
	}
	else if ((universe.size() >= 2) && (universe.size() <= 3))
	{
		if (max_q != min_q + 2 * spilled)
		{
			cout << "Unrecoverable configuration.";
			return 0;
		}
		if (universe.size() ==  3)
		{
			int norm_q = *(++universe.begin());
			if ((min_q + spilled != norm_q) || (max_q - spilled != norm_q))
			{
				cout << "Unrecoverable configuration.";
				return 0;
			}
		}
		int from = -1;
		int to = -1;
		for (int i = 0; i < qs.size(); i++)
		{
			if (qs[i] == min_q)
			{
				if (from == -1)
				{
					from = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
			else if (qs[i] == max_q)
			{
				if (to == -1)
				{
					to = i;
				}
				else
				{
					cout << "Unrecoverable configuration.";
					return 0;
				}
			}
		}
		cout << spilled << " ml. from cup #" << from + 1 << " to cup #" << to + 1 << ".";
		return 0;
	}
	else
	{
		cout << "Unrecoverable configuration.";
		return 0 ;
	}
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
				for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
				if (x->first!=y->first &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->first)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->first)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
			cout<<"Unrecoverable configuration.\n";
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
				for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
				if (x->first!=y->first &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->first)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
			cout<<"Unrecoverable configuration.\n";
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(m)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(m)==3)
		{
			for(auto x=c.begin();x!=c.end();++x)
				for(auto y=c.begin();y!=c.end();++y)
				if (x!=y &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
				for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
				if (x!=y &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(m)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(m)==3)
		{
			for(auto x=c.begin();x!=c.end();++x)
				for(auto y=c.begin();y!=c.end();++y)
				if (x!=y &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
				for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
				if (x!=y &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
			cout<<"Unrecoverable configuration.\n";
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(auto x=c.begin();x!=c.end();++x)
				for(auto y=c.begin();y!=c.end();++y)
				if (x!=y &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (L(c)==3)
		{
			for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
				for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
				if (x->first!=y->first &&
					y->second==1 &&
					x->second==n-2 &&
					c.find(2*x->first-y->second)!=c.end() &&
					y->first<x->first)
				{
					int pos1=0;
					while(a[pos1]!=y->first)
						pos1++;
					int pos2=0;
					while(a[pos2]!=2*x->first-y->second)
						pos2++;
					cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
					return 0;
				}
			cout<<"Unrecoverable configuration.\n";
		}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;
#define L(s) (int)(s).size()
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define inf 1000000000
int n;
map<int,int> c;
int a[1111];
int main()
{
	cin>>n;
	rp(i,n)
	{
		int x;
		cin>>x;
		c[x]++;
		a[i]=x;
	}
	if (L(c)==1)
		cout<<"Exemplary pages.\n";
	else
		if (n==2)
		{
			if ((a[0]-a[1])&1)
				cout<<"Unrecoverable configuration.\n";
			else
				if (a[0]>a[1])
					cout<<(a[0]-a[1])/2<<" ml. from cup #2 to cup #1.\n";
				else
					cout<<(a[1]-a[0])/2<<" ml. from cup #1 to cup #2.\n";
		}
		else
			if (L(c)==3)
			{
				for(map<int,int>::iterator x=c.begin();x!=c.end();++x)
					for(map<int,int>::iterator y=c.begin();y!=c.end();++y)
					if (x->first!=y->first &&
						y->second==1 &&
						x->second==n-2 &&
						c.find(2*x->first-y->first)!=c.end() &&
						y->first<x->first)
					{
						int pos1=0;
						while(a[pos1]!=y->first)
							pos1++;
						int pos2=0;
						while(a[pos2]!=2*x->first-y->first)
							pos2++;
						cout<<x->first-y->first<<" ml. from cup #"<<pos1+1<<" to cup #"<<pos2+1<<"."<<endl;
						return 0;
					}
				cout<<"Unrecoverable configuration.\n";
			}
		else
			cout<<"Unrecoverable configuration.\n";
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
int main(){
	int p[1011],tmp,ct[1011]={0},f=-1,t=-1,rec=-1;
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if ((f==-1||t==-1)||(p[t-1]-p[f-1])%2==1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	else printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
int n,m;
int p[1011],tmp,sum,ct[100011]={0},f=-1,t=-1,rec=-1;
int main(){
	scanf("%d",&n);
	for (int i=0;i<n;i++){
		scanf("%d",p+i);
		sum+=p[i];
	}
	if (sum%n!=0){
		puts("Unrecoverable configuration.");
		return 0;
	}
	rec=sum/n;
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (p[i]>rec){
			if (t!=-1){
				puts("Unrecoverable configuration.");
				return 0;

			}
			else{
				t=i;
			}
		}
		if (p[i]<rec){
			if (f!=-1){
				puts("Unrecoverable configuration.");
				return 0;
			}
			else{
				f=i;
			}
		}
	}
	if (ct[rec]==n){

		puts("Exemplary pages.");
		return 0;
	}
	if (ct[rec]!=n-2){
		puts("Unrecoverable configuration.");
		return 0;

	}
	printf("%d ml. from cup #%d to cup #%d.\n",p[t]-rec,f+1,t+1);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
int main(){
	int p[1011],tmp,ct[1011]={0},f=-1,t=-1,rec=-1;
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1||(p[t-1]-p[f-1])%2==1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	else printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
	int p[1011],tmp,ct[100011]={0},f=-1,t=-1,rec=-1;
int main(){
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			if (3*(p[t]+p[f])/2==p[1]+p[2]+p[0])
				printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
			else puts("Unrecoverable configuration.");
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	if ((p[t-1]-p[f-1])%2==1||(p[t-1]+p[f-1])/2!=rec){
		puts("Unrecoverable configuration.");
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
	int p[1011],tmp,ct[1011]={0},f=-1,t=-1,rec=-1;
int main(){
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			if (3*(p[t]+p[f])/2==p[1]+p[2]+p[0])
				printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
			else puts("Unrecoverable configuration.");
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	if ((p[t-1]-p[f-1])%2==1||(p[t-1]+p[f-1])/2!=rec){
		puts("Unrecoverable configuration.");
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
	int p[1011],tmp,ct[1011]={0},f=-1,t=-1,rec=-1;
int main(){
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	if ((p[t-1]-p[f-1])%2==1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
int main(){
	int p[1001],tmp,ct[1001]={0},f=-1,t=-1,rec=-1;
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	else printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include<stdio.h>
#include<queue>
#include<string.h>
#include<vector>
using namespace std;
#define PII pair<__int64,__int64>
#define X first
#define Y second
	int n,m;
	int p[1011],tmp,ct[1011]={0},f=-1,t=-1,rec=-1;
int main(){
	scanf("%d",&n);
	for (int i=0;i<n;i++) scanf("%d",p+i);
	if (n==1){
			puts("Exemplary pages.");
			return 0;
	}
	if (n==2){
		if (p[0]==p[1]){
			puts("Exemplary pages.");
			return 0;
		}
		else if ((p[0]+p[1])%2==1){
			puts("Unrecoverable configuration.");
			return 0;
		}
		else{
			if (p[0]>p[1]){
				f=1;
				t=0;
			}
			else{
				f=0;
				t=1;
			}
			printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
		}
		return 0;
	}
	if (n==3){
		if ((p[0]+p[1]+p[2])%3!=0){
			puts("Unrecoverable configuration.");
			return 0;
		}
		if (p[0]==p[1]&&p[1]==p[2]){
			puts("Exemplary pages.");
			return 0;
		}
		else{
			if (p[0]>p[1]&&p[0]>p[2]) t=0;
			else if (p[1]>p[2]) t=1;
			else t=2;
			if (p[0]<p[1]&&p[0]<p[2]) f=0;
			else if (p[1]<p[2]) f=1;
			else f=2;
			if (3*(p[t]+p[f])/2==p[1]+p[2]+p[0])
				printf("%d ml. from cup #%d to cup #%d.\n",(p[t]-p[f])/2,f+1,t+1);
			else puts("Unrecoverable configuration.");
		}
		return 0;
	}
	for (int i=0;i<n;i++){
		ct[p[i]]++;
		if (ct[p[i]]>1){
			if (rec!=-1&&rec!=p[i]){
				//	printf("%d %d\n",rec,i);
				puts("Unrecoverable configuration.");
				return 0;
			}
			else rec=p[i];
		}
	}
	for (int i=0;i<n;i++){
		if (p[i]>rec)
			if (t==-1) t=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
		if (p[i]<rec)
			if (f==-1) f=i+1;
			else{
				puts("Unrecoverable configuration.");
				return 0;
			}
	}
	if (ct[rec]==n){
		puts("Exemplary pages.");
		return 0;
	}
	if (f==-1||t==-1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	if ((p[t-1]-p[f-1])%2==1){
		puts("Unrecoverable configuration.");
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n",p[t-1]-rec,f,t);

	return 0;
}


#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
void main()
{
	int i,n,t;
	int A[1000];
	int S=0,Q;
	int a=0,b=0,v=0;
	scanf("%d",&n);
	for (i=0;i<n;i++) {scanf("%d",&t); A[i]=t; S+=t;}
	if (S%n!=0) printf("Unrecoverable configuration.\n");
	else
	{
		Q=S/n;
		for (i=0;i<n;i++) if (A[i]!=Q)
		{
			if (v==0)
			{
				v=A[i]-Q;
				if (v>0) b=i+1; else a=i+1;
			}
			else
			{
				if (A[i]-Q==-v && (a==0 || b==0))
				{
					if (a==0) a=i+1;
					else b=i+1;
				}
				else
				{
					printf("Unrecoverable configuration.\n");
					v=1000000;
					break;
				}
			}
		}
		if (v==0) printf("Exemplary pages.\n");
		else if (v<1000000) printf("%d ml. from cup #%d to cup #%d.\n",v,a,b);
	}
}


#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
void main()
{
	int i,n,t;
	int A[1000];
	int S=0,Q;
	int a=0,b=0,v=0;
	scanf("%d",&n);
	for (i=0;i<n;i++) {scanf("%d",&t); A[i]=t; S+=t;}
	if (S%n!=0) printf("Unrecoverable configuration.\n");
	else
	{
		Q=S/n;
		for (i=0;i<n;i++) if (A[i]!=Q)
		{
			if (v==0)
			{
				v=A[i]-Q;
				if (v>0) b=i+1; else a=i+1;
			}
			else
			{
				if (A[i]-Q==-v && (a==0 || b==0))
				{
					if (a==0) a=i+1;
					else b=i+1;
				}
				else
				{
					printf("Unrecoverable configuration.\n");
					v=1000000;
					break;
				}
			}
		}
		if (v<0) v=-v;
		if (v==0) printf("Exemplary pages.\n");
		else if (v<1000000) printf("%d ml. from cup #%d to cup #%d.\n",v,a,b);
	}
}


#include<iostream>
#include<memory.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<map>
#include<ctime>
using namespace std;
struct node
{
	int v,id;
}cup[10005];
int cnt[100005],idx[10];
int cmp(node a,node b)
{
	return a.v<b.v;
}
int main()
{
	int i,j,k,n;
	scanf("%d",&n);
	memset(cnt,0,sizeof(cnt));
	for(i=0;i<n;i++)
	{
		scanf("%d",&cup[i].v);
		cnt[cup[i].v]++;
		cup[i].id=i;
	}
	sort(cup,cup+n,cmp);
	if(n==1)
	{
		puts("Exemplary pages.");
		return 0;
	}
	if(n==2)
	{
		if(cup[0].v!=cup[1].v)
		{
			if((cup[1].v-cup[0].v)%2==0)
			{
				printf("%d ml. from cup #%d to cup #%d.\n",(cup[1].v-cup[0].v)/2,cup[0].id+1,cup[1].id+1);
			}
			else
				puts("Unrecoverable configuration.");
		}
		else
			puts("Exemplary pages.");
		return 0;
	}
	j=0;
	int maxx=-1,Min=9999999;
	int cnt1=0,cnt2=0;
	for(i=0;i<n;i++)
	{
		if(i==0||cup[i].v!=cup[i-1].v)
		{
			j++;
			if(cup[i].v>maxx)
			{
				cnt1=1;
				maxx=cup[i].v;
				idx[2]=cup[i].id+1;
			}

			if(cup[i].v<Min)
			{
				cnt2=1;
				Min=cup[i].v;
				idx[1]=cup[i].id+1;
			}

		}
	 	else
		 {
		 	if(cup[i].v==maxx)
				cnt1++;
			if(cup[i].v==Min)
				cnt2++;
		 }
	}
	if(Min==maxx)
		puts("Exemplary pages.");
	else if(j==3&&((maxx-Min)%2==0)&&cnt1==1&&cnt2==1)
	{
		for(i=0;i<n;i++)
			if(cup[i].v!=Min&&cup[i].v!=maxx)
				k=cup[i].v;
		if(maxx+Min==2*k)
			printf("%d ml. from cup #%d to cup #%d.\n",(maxx-Min)/2,idx[1],idx[2]);
		else
			puts("Unrecoverable configuration.");
	}
	else
		puts("Unrecoverable configuration.");
	return 0;
}


#include<iostream>
#include<memory.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<map>
#include<ctime>
using namespace std;
struct node
{
	int v,id;
}cup[10005];
int cnt[100005],idx[10];
int cmp(node a,node b)
{
	return a.v<b.v;
}
int main()
{
	int i,j,k,n;
	scanf("%d",&n);
	memset(cnt,0,sizeof(cnt));
	for(i=0;i<n;i++)
	{
		scanf("%d",&cup[i].v);
		cnt[cup[i].v]++;
		cup[i].id=i;
	}
	sort(cup,cup+n,cmp);
	if(n==1)
	{
		puts("Exemplary pages.");
		return 0;
	}
	if(n==2)
	{
		if(cup[0].v!=cup[1].v)
		{
			if((cup[1].v-cup[0].v)%2==0)
			{
				printf("%d ml. from cup #%d to cup #%d.\n",(cup[1].v-cup[0].v)/2,cup[0].id+1,cup[1].id+1);
			}
			else
				puts("Unrecoverable configuration.");
		}
		else
			puts("Exemplary pages.");
		return 0;
	}
	j=0;
	int maxx=-1,Min=9999999;
	int cnt1=0,cnt2=0;
	for(i=0;i<n;i++)
	{
		if(i==0||cup[i].v!=cup[i-1].v)
		{
			j++;
			if(cup[i].v>maxx)
			{
				cnt1=1;
				maxx=cup[i].v;
				idx[2]=cup[i].id+1;
			}

			if(cup[i].v<Min)
			{
				cnt2=1;
				Min=cup[i].v;
				idx[1]=cup[i].id+1;
			}

		}
	 	else
		 {
		 if(cup[i].v==maxx)
				cnt1++;
				if(cup[i].v==Min)
				cnt2++;
		 }
	}
	if(j==1)
		puts("Exemplary pages.");
	else if(j==3&&((maxx-Min)%2==0)&&cnt1==1&&cnt2==1)
	{
		printf("%d ml. from cup #%d to cup #%d.\n",(maxx-Min)/2,idx[1],idx[2]);
	}
	else
		puts("Unrecoverable configuration.");
	return 0;
}


#include<iostream>
#include<memory.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<map>
#include<ctime>
using namespace std;
struct node
{
	int v,id;
}cup[10005];
int cnt[100005],idx[10];
int cmp(node a,node b)
{
	return a.v<b.v;
}
int main()
{
	int i,j,k,n;
	scanf("%d",&n);
	memset(cnt,0,sizeof(cnt));
	for(i=0;i<n;i++)
	{
		scanf("%d",&cup[i].v);
		cnt[cup[i].v]++;
		cup[i].id=i;
	}
	sort(cup,cup+n,cmp);
	if(n==1)
	{
		puts("Exemplary pages.");
		return 0;
	}
	if(n==2)
	{
		if(cup[0].v!=cup[1].v)
		{
			if((cup[1].v-cup[0].v)%2==0)
			{
				printf("%d ml. from cup #%d to cup #%d.\n",(cup[1].v-cup[0].v)/2,cup[0].id+1,cup[1].id+1);
			}
			else
				puts("Unrecoverable configuration.");
		}
		else
			puts("Exemplary pages.");
		return 0;
	}
	j=0;
	int maxx=-1,Min=9999999;
	int cnt1=0,cnt2=0;
	for(i=0;i<n;i++)
	{
		if(i==0||cup[i].v!=cup[i-1].v)
		{
			j++;
			if(cup[i].v>maxx)
			{
				cnt1=1;
				maxx=cup[i].v;
				idx[2]=cup[i].id+1;
			}

			if(cup[i].v<Min)
			{
				cnt2=1;
				Min=cup[i].v;
				idx[1]=cup[i].id+1;
			}

		}
	 	else
		 {
		 	if(cup[i].v==maxx)
				cnt1++;
			if(cup[i].v==Min)
				cnt2++;
		 }
	}
	if(Min==maxx)
		puts("Exemplary pages.");
	else if(j==3&&((maxx-Min)%2==0)&&cnt1==1&&cnt2==1)
	{
		printf("%d ml. from cup #%d to cup #%d.\n",(maxx-Min)/2,idx[1],idx[2]);
	}
	else
		puts("Unrecoverable configuration.");
	return 0;
}


#include<iostream>
#include<memory.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<map>
#include<ctime>
using namespace std;
struct node
{
	int v,id;
}cup[10005];
int cnt[100005],idx[10];
int cmp(node a,node b)
{
	return a.v<b.v;
}
int main()
{
	int i,j,k,n;
	scanf("%d",&n);
	memset(cnt,0,sizeof(cnt));
	for(i=0;i<n;i++)
	{
		scanf("%d",&cup[i].v);
		cnt[cup[i].v]++;
		cup[i].id=i;
	}
	sort(cup,cup+n,cmp);
	if(n==1)
	{
		puts("Exemplary pages.");
		return 0;
	}
	if(n==2)
	{
		if(cup[0].v!=cup[1].v)
		{
			printf("%d ml. from cup #%d to cup #%d.\n",(cup[1].v-cup[0].v)/2,cup[0].id+1,cup[1].id+1);
		}
		else
			puts("Exemplary pages.");
		return 0;
	}
	j=0;
	int maxx=-1,Min=9999999;
	for(i=0;i<n;i++)
	{
		if(i==0||cup[i].v!=cup[i-1].v)
		{
			j++;
			if(cup[i].v>maxx)
			{
				maxx=cup[i].v;
				idx[2]=cup[i].id+1;
			}
			if(cup[i].v<Min)
			{
				Min=cup[i].v;
				idx[1]=cup[i].id+1;
			}
		}
	}

	if(j==1)
		puts("Exemplary pages.");
	else if(j==3)
	{
		printf("%d ml. from cup #%d to cup #%d.\n",(maxx-Min)/2,idx[1],idx[2]);
	}
	else
		puts("Unrecoverable configuration.");
	return 0;
}


#include<stdio.h>

int a[1010];
int main(){
	int n,sum=0,ave,count=0,ok=2,p,q;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}
	if(sum%n){
		printf("Unrecoverable configuration.");
		return 0;
	}
	ave=sum/n;
	for(i=0;i<n;i++){
		if(a[i]!=ave){
			count++;
			if(count>2){
				printf("Unrecoverable configuration.");
				return 0;
			}
			if(ok==2){
				if(a[i]>ave){
					ok=1;
					q=i;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==1){
				if(a[i]>ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==0){
				if(a[i]<ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=1;
					q=i;
				}
			}
		}
	}
	if(count==0)
		printf("Exemplary pages.");
	else{
		printf("%d ml. from cup #%d to cup #%d.",a[q]-ave,p+1,q+1);
	}
	return 0;
}


#include<iostream>
using namespace std;
int a[1010];
int main(){
	int n,sum=0,ave,count=0,ok=2,p,q;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}
	if(sum%n){
		printf("Unrecoverable configuration.");
		return 0;
	}
	ave=sum/n;
	for(i=0;i<n;i++){
		if(a[i]!=ave){
			count++;
			if(count>2){
				printf("Unrecoverable configuration.");
				return 0;
			}
			if(ok==2){
				if(a[i]>ave){
					ok=1;
					q=i;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==1){
				if(a[i]>ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==0){
				if(a[i]<ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=1;
					q=i;
				}
			}
		}
	}
	if(count==0)
		printf("Exemplary pages.");
	else{
		printf("%d ml. from cup #%d to cup #%d.",a[q]-ave,p+1,q+1);
	}
	return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;
int a[1010];
int main(){
	int i,n,sum=0,ave,count=0,ok=2,p,q;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}
	if(sum%n){
		printf("Unrecoverable configuration.");
		return 0;
	}
	ave=sum/n;
	for(i=0;i<n;i++){
		if(a[i]!=ave){
			count++;
			if(count>2){
				printf("Unrecoverable configuration.");
				return 0;
			}
			if(ok==2){
				if(a[i]>ave){
					ok=1;
					q=i;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==1){
				if(a[i]>ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=0;
					p=i;
				}
			}
			else
			if(ok==0){
				if(a[i]<ave){
					printf("Unrecoverable configuration.");
					return 0;
				}
				else{
					ok=1;
					q=i;
				}
			}
		}
	}
	if(count==0)
		printf("Exemplary pages.");
	else{
		printf("%d ml. from cup #%d to cup #%d.",a[q]-ave,p+1,q+1);
	}
	return 0;
}


#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <iomanip>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <hash_set>
#include <hash_map>
#include <algorithm>

//define NDEBUG
#include <cassert>

#define FILE_READER assert(freopen("input.txt", "r", stdin)); assert(freopen("output.txt", "w", stdout));
#define FAST_READER ios::sync_with_stdio(false); cin.tie(nullptr);
#define all_(v) (v).begin(), (v).end()
#define for_(i, a, b) for (int i = (a); i < (int)(b); i++)
#define ford_(i, a, b) for (int i = (a); i > (int)(b); i--)
#define foreach_(it,S) for(__typeof((S).begin()) it = (S).begin(); it != (S).end(); it++)
#define sz_(v) ((int)(v).size())
#define mp_ make_pair
#define pb_ push_back
typedef long long LL_;
typedef long double LD_;
template<class T> T sqr_(T a) {return a * a;}
template<class T> T abs_(T a) {return a > 0 ? a : -a;}
template<class T> T sgn_(T a) {return a > 0 ? 1 : (a < 0 ? -1 : 0);}

using namespace std;

void good() {
	cout << "Exemplary pages.";
}

void soso(int v, int a, int b) {
	cout << v << " ml. from cup #" <<  a << " to cup #" << b << ".";
}

void bad() {
	cout << "Unrecoverable configuration.";
}

int main() {

#ifndef ONLINE_JUDGE
	FILE_READER
#endif

	FAST_READER;

	int n;
	cin >> n;
	int a, b;
	a = b = -1;
	int s = 0;
	int amt = 0;
	vector<int> v(n);
	for_(i, 0, n) {
		cin >> v[i];
		s += v[i];
	}
	if (s % n != 0) {
		bad();
		return 0;
	}
	s /= n;
	for_(i,0,n) {
		if (v[i] == s) continue;
		++amt;
		if (v[i] < s) {
			if (a == -1)
				a = i + 1;
			else {
				bad();
				return 0;
			}
		}
		if (v[i] > s) {
			if (b == -1)
				b = i + 1;
			else {
				bad();
				return 0;
			}
		}
	}
	if (amt == 0) {
		good();
		return 0;
	}
	if (amt != 2) {
		bad();
		return 0;
	}
	soso(v[b - 1] - s, a, b);

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#define _USE_MATH_DEFINES

#include <utility>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <map>

using namespace std;

typedef long long int64;
#define INF 1234567890
#define prime 1103
#define FOR(a, b) for(int a = 0; a < b; ++a)

int n, a[1001], kol = 0, YES = 0;

void pro(int q)
{
        vector <int> v; kol = 0;
        FOR(i, n)
        {
                if (a[i] == a[q]) ++kol;
                else
                        v.push_back(i);
        }
        if (kol == n)
        {
                cout << "Exemplary pages.";
                ++YES;
                return ;
        }
        if (kol == n - 2)
        {
                if ((a[v[0]] + a[v[1]])/2 == a[q])
                {
                        int m = max(a[v[0]], a[v[1]]), num, NUM;
                        if (m == a[v[0]]) num = v[0]; else num = v[1];
                        if (m != a[v[0]]) NUM = v[0]; else NUM = v[1];
                        m -= a[q];
                        ++YES;
                        cout << m << " ml. from cup #" << NUM + 1 << " to cup #" << num + 1 << ".";
                        return ;
                }
        }
}
int main()
{
        //freopen("crafting.in", "r", stdin);   freopen("crafting.out", "w", stdout);
        //freopen("input.txt", "r", stdin);     freopen("output.txt", "w", stdout);
        cin >> n;
		if (n == 1)
		{
			cout << "Exemplary pages.";
			return 0;
		}
		if (n == 2)
		{
			int x, y;
			cin >> x >> y;
			if (x == y)
			{
				cout << "Exemplary pages.";
				return 0;
			}
			if ((x + y)%2 == 0)
			{
				int m = (x + y)/2;
				if (x < y)
				{
					cout << m << " ml. from cup #" << 1 << " to cup #" << 2 << ".";
				}
				else
				{
					cout << m << " ml. from cup #" << 2 << " to cup #" << 1 << ".";
				}
				return 0;
			}
			else
			{
				cout << "Unrecoverable configuration.";
				return 0;
			}
		}
        FOR(i, n)
                cin >> a[i];
        pro(0);
        if (!YES) pro(1);
        if (!YES) pro(2);
        if (!YES) cout << "Unrecoverable configuration.";
        return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#define _USE_MATH_DEFINES

#include <utility>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <map>

using namespace std;

typedef long long int64;
#define INF 1234567890
#define prime 1103
#define FOR(a, b) for(int a = 0; a < b; ++a)

int n, a[1001], kol = 0, YES = 0;

void pro(int q)
{
	vector <int> v; kol = 0;
	FOR(i, n)
	{
		if (a[i] == a[q]) ++kol;
		else
			v.push_back(i);
	}
	if (kol == n)
	{
		cout << "Exemplary pages.";
		++YES;
		return ;
	}
	if (kol == n - 2)
	{
		if ((a[v[0]] + a[v[1]])/2 == a[q])
		{
			int m = max(a[v[0]], a[v[1]]), num, NUM;
			if (m == a[v[0]]) num = v[0]; else num = v[1];
			if (m != a[v[0]]) NUM = v[0]; else NUM = v[1];
			m -= a[q];
			++YES;
			cout << m << " ml. from cup #" << NUM + 1 << " to cup #" << num + 1 << ".";
			return ;
		}
	}
}
int main()
{
	//freopen("crafting.in", "r", stdin);   freopen("crafting.out", "w", stdout);
	//freopen("input.txt", "r", stdin);     freopen("output.txt", "w", stdout);
	cin >> n;
	FOR(i, n)
		cin >> a[i];
	pro(0);
	if (!YES) pro(1);
	if (!YES) pro(2);
	if (!YES) cout << "Unrecoverable configuration.";
	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#define _USE_MATH_DEFINES

#include <utility>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <map>

using namespace std;

typedef long long int64;
#define INF 1234567890
#define prime 1103
#define FOR(a, b) for(int a = 0; a < b; ++a)

int n, a[1001], kol = 0, YES = 0;

void pro(int q)
{
        vector <int> v; kol = 0;
        FOR(i, n)
        {
                if (a[i] == a[q]) ++kol;
                else
                        v.push_back(i);
        }
        if (kol == n)
        {
                cout << "Exemplary pages.";
                ++YES;
                return ;
        }
        if (kol == n - 2)
        {
                if ((a[v[0]] + a[v[1]])%2 == 0 && (a[v[0]] + a[v[1]])/2 == a[q])
                {
                        int m = max(a[v[0]], a[v[1]]), num, NUM;
                        if (m == a[v[0]]) num = v[0]; else num = v[1];
                        if (m != a[v[0]]) NUM = v[0]; else NUM = v[1];
                        m -= a[q];
                        ++YES;
                        cout << m << " ml. from cup #" << NUM + 1 << " to cup #" << num + 1 << ".";
                        return ;
                }
        }
}
int main()
{
        //freopen("crafting.in", "r", stdin);   freopen("crafting.out", "w", stdout);
        //freopen("input.txt", "r", stdin);     freopen("output.txt", "w", stdout);
        cin >> n;
		if (n == 1)
		{
			cout << "Exemplary pages.";
			return 0;
		}
		if (n == 2)
		{
			int x, y;
			cin >> x >> y;
			if (x == y)
			{
				cout << "Exemplary pages.";
				return 0;
			}
			if ((x + y)%2 == 0)
			{
				int m = (x + y)/2;
				if (x < y)
				{
					cout << m << " ml. from cup #" << 1 << " to cup #" << 2 << ".";
				}
				else
				{
					cout << m << " ml. from cup #" << 2 << " to cup #" << 1 << ".";
				}
				return 0;
			}
			else
			{
				cout << "Unrecoverable configuration.";
				return 0;
			}
		}
        FOR(i, n)
                cin >> a[i];
        pro(0);
        if (!YES) pro(1);
        if (!YES) pro(2);
        if (!YES) cout << "Unrecoverable configuration.";
        return 0;
}


#include <cstdio>
#include <algorithm>
#include <iostream>

using namespace std;

#define MAXN 10000
#define INF 1000000000
int N, a[MAXN];
int main()
{

    scanf("%d", &N);
    int sum = 0;
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &a[i]);
        sum += a[i];
    }
    if (sum % N != 0)
    {
        printf("Unrecoverable configuration.");
        return 0;
    }

    int p = sum / N;
    int kl = 0, ikl = 0, ikr = 0;
    int kr = 0;
    for (int i = 0; i < N; i++)
        if (a[i] < p)
        {
            kl++;
            ikl = i;
        }
        else if (a[i] > p)
        {
            kr++;
            ikr = i;
        }
    if (ikr > 1 || ikr > 1)
    {
        printf("Unrecoverable configuration.");
        return 0;
    }
    if (ikr == 0 && ikl == 0)
    {
        printf("Exemplary pages.");
        return 0;
    }

    printf("%d ml. from cup #%d to cup #%d.", a[ikr] - p, ikl + 1, ikr + 1);

    return 0;
}


#include <cstdio>
#include <algorithm>
#include <iostream>

using namespace std;

#define MAXN 10000
#define INF 1000000000
int N, a[MAXN];
int main()
{
    scanf("%d", &N);
    int sum = 0;
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &a[i]);
        sum += a[i];
    }
    if (sum % N != 0)
    {
        printf("Unrecoverable configuration.");
        return 0;
    }

    int p = sum / N;
    int kl = 0, ikl = 0, ikr = 0;
    int kr = 0;
    for (int i = 0; i < N; i++)
        if (a[i] < p)
        {
            kl++;
            ikl = i;
        }
        else if (a[i] > p)
        {
            kr++;
            ikr = i;
        }
    if (kr > 1 || kr > 1)
    {
        printf("Unrecoverable configuration.");
        return 0;
    }
    if (kr == 0 && kl == 0)
    {
        printf("Exemplary pages.");
        return 0;
    }

    printf("%d ml. from cup #%d to cup #%d.", a[ikr] - p, ikl + 1, ikr + 1);

    return 0;
}


#include <iostream>
#include <stdio.h>
#include<vector>
#include <string>
#include<algorithm>
#include <memory.h>
#include<queue>
#include<set>
#include<map>
#include<bitset>
#define M_P make_pair
typedef long long ll;
using namespace std;
map<double, int> Freq;
set<double> st;
int main(){
    vector<double> d;
    int n;scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        double z;cin >> z;
        st.insert(z), d.push_back(z);
        Freq[z]++;
    }
    if (st.size() > 3) {
        printf("Unrecoverable configuration.\n");
    }
    else if (st.size() == 1) {
        printf("Exemplary pages.\n");
    }
    else if (st.size() == 2) {
        set<double>::iterator it = st.begin();
        int F, T;double a = *it; ++it;double b = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                 F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == b) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        if (Freq[a] == 1 || Freq[b] == 1)
        printf("%.9lf ml. from cup #%d to cup #%d.\n", fabs(a - b), F + 1, T + 1);
    }
    else {
        set<double>::iterator it = st.begin();
        int F, T;double a = *it; ++it;double b = *it; it++;double c = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == c) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        sort(d.begin(), d.end());
        if(fabs(a - b) == fabs(b-c) && Freq[a] == 1 && Freq[c]==1)
        printf("%.9lf ml. from cup #%d to cup #%d.\n", fabs(a - b), F + 1, T + 1);
        else printf("Unrecoverable configuration.\n");
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<vector>
#include <string>
#include<algorithm>
#include <memory.h>
#include<queue>
#include<set>
#include<map>
#include<bitset>
#define M_P make_pair
typedef long long ll;
using namespace std;
map<int, int> Freq;
set<int> st;
int main(){
    vector<int> d;
    int n;scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int z;cin >> z;
        st.insert(z), d.push_back(z);
        Freq[z]++;
    }
    if (st.size() > 3) {
        printf("Unrecoverable configuration.\n");
    }
    else if (st.size() == 1) {
        printf("Exemplary pages.\n");
    }
    else if (st.size() == 2) {
        set<int>::iterator it = st.begin();
        int F, T;int a = *it; ++it;int b = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                 F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == b) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        if ((Freq[a] == 1 || Freq[b] == 1) && b > 1 && abs(a-b)%2==0)
        printf("%d ml. from cup #%d to cup #%d.\n", abs(a - b) / 2, F + 1, T + 1);
        else
            printf("Unrecoverable configuration.\n");
    }
    else {
        set<int>::iterator it = st.begin();
        int F, T;int a = *it; ++it;int b = *it; it++;int c = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == c) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        sort(d.begin(), d.end());
        if(abs(a - b) == abs(b-c) && Freq[a] == 1 && Freq[c]==1 && c > 1 && abs(a-c)%2==0)
        printf("%d ml. from cup #%d to cup #%d.\n", abs(a - c)/2, F + 1, T + 1);
        else printf("Unrecoverable configuration.\n");
    }
    return 0;
}


#include <iostream>
#include <stdio.h>
#include<vector>
#include <string>
#include<algorithm>
#include <memory.h>
#include<queue>
#include<set>
#include<map>
#include<bitset>
#define M_P make_pair
typedef long long ll;
using namespace std;
map<int, int> Freq;
set<int> st;
int main(){
    vector<int> d;
    int n;scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        int z;cin >> z;
        st.insert(z), d.push_back(z);
        Freq[z]++;
    }
    if (st.size() > 3) {
        printf("Unrecoverable configuration.\n");
    }
    else if (st.size() == 1) {
        printf("Exemplary pages.\n");
    }
    else if (st.size() == 2) {
        set<int>::iterator it = st.begin();
        int F, T;int a = *it; ++it;int b = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                 F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == b) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        if ((Freq[a] == 1 || Freq[b] == 1) && b > 1)
        printf("%d ml. from cup #%d to cup #%d.\n", abs(a - b), F + 1, T + 1);
        else
            printf("Unrecoverable configuration.\n");
    }
    else {
        set<int>::iterator it = st.begin();
        int F, T;int a = *it; ++it;int b = *it; it++;int c = *it;
        for (int i = 0; i < d.size(); i++) {
            if (d[i] == a) {
                F = i;
                for (int j = 0; j < d.size(); j++) {
                    if (d[j] == c) {
                        T = j;i = d.size() + 1;
                        break;
                    }
                }
            }
        }
        sort(d.begin(), d.end());
        if(abs(a - b) == abs(b-c) && Freq[a] == 1 && Freq[c]==1 && c > 1)
        printf("%d ml. from cup #%d to cup #%d.\n", abs(a - b), F + 1, T + 1);
        else printf("Unrecoverable configuration.\n");
    }
    return 0;
}