#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define PI 3.1415926535
#define ff              first
#define ss              second
#define int             long long int
#define float           double
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define from(i,n)       for(int i=0;i<(int)n;i++)
#define from_j(i,j,n)   for(int i=j;i<(int)n;i++)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

void c_p_c()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}

int32_t main()
{
    c_p_c();
    w(t){
        string s;
        cin>>s;
        int res=0,l=s.size(),init=-1;
        vi v(l);
        if(s[0]=='+')
        v[0]=1;
        else v[0]=-1;
        for(int i=1;i<l;i++)
        {
        if(s[i]=='+')
        v[i]=v[i-1]+1;
        else v[i]=v[i-1]-1;
        }

        while(1)
        {
            init++;
            int cur=init;
            int ok=1,i=0;
            for(i;i<l;i++)
            {
                if(cur+v[i]<0)
                {
                    ok=0;
                    break;
                }
            }
            res+=i+1;
            //cout<<res<<endl;
            if(ok)
            break;

        }
        cout<<res-1<<endl;

/*res = 0
for init = 0 to inf
    cur = init
    ok = true
    for i = 1 to |s|
        res = res + 1
        if s[i] == '+'
            cur = cur + 1
        else
            cur = cur - 1
        if cur < 0
            ok = false
            break
    if ok
        break
        */

    }
    return 0;
}


            /* In The Name of Allah */
       /* به نام خداوند بخشنده و مهربان */

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

using namespace std;

/* Math */
template < class T > inline T GCD(T a , T b){ if(a < 0) return GCD(-a , b) ; if(b < 0) return GCD(a , -b) ; return (b == 0) ? a : GCD(b , a % b) ; }
template < class T > inline T LCM(T a , T b){ if(a < 0) return LCM(-a , b) ; if(b < 0) return LCM(a , -b) ; return a * (b / GCD(a , b)) ; }
template < class T > inline bool isPrime(T n){ if(n < 2) return false ; for(T i = 2 ; i * i <= n ; i++) if(n % i == 0) return false ; return true ; }
template < class T > vector <T> Divisor(T num){ vector <T> res ; res.clear() ; for(int i = 1 ; i <= num/2 ; i++) if(num % i == 0) res.push_back(i) ; return res ; }
template < class T , class M > inline T POWER(T x , M y){/* (x ^ y) compute to 2^63 */ T temp = 1 ; if(y == 0) return 1 ; for(int i = 1 ; i <= y ; i++) temp *= x  ; return temp ;}

/* Manipulation */
template < class T , class M > bool Exist(T x , M element) { for(int i = 0 ; i < x.size() ; i++) if(x[i] == element) return true ; return false ; }
template < class T > vector <T> Unique(vector <T> v){ T temp ; vector <T> res ; res.clear() ; for(int i = 0 ; i  < v.size() ; i++){temp = v[i] ; if(Exist(res,temp) == false) res.push_back(temp) ; } return res ; }
template < class T > vector <T> Parse(T temp){ vector <T> ans ; ans.clear() ; T s ; istringstream is(temp) ; while(is >> s){ ans.push_back(s) ; } return ans ; }
template < class T > string toString(T x) {stringstream s ; s << x; return s.str() ; }
template < class T > long long toInt(T x) {istringstream is(x) ; long long num  ; is >> num ; return num ; }

template< class T > inline void checkMin(T &a , T b){ if(b < a) a = b ; }
template< class T > inline void checkMax(T &a , T b){ if(b > a) a = b ; }

bool isLowerCase(char c){ return (c >= 'a' &&  c <= 'z') ; }
bool isUpperCase(char c){ return (c >= 'A' &&  c <= 'Z') ; }
char toLowerCase(char c){ return (isUpperCase(c) ? (c + 32) : c) ; }
char toUpperCase(char c){ return (isLowerCase(c) ? (c - 32) : c) ; }
bool isLetter ( char c ){ return (isUpperCase(c)) || (isLowerCase(c)) ; }
bool isDigit  ( char c ){ return (c >= '0' &&  c <= '9') ; }

/* Debug */
template < class T > void print(T ans){ for(unsigned int i = 0 ; i < ans.size() ; i++ ) cout << ans[i] << " " ;  cout << endl ; }
template < class T > void print2(T ans){ cout << ans ;  cout << endl ; }

typedef long long LL ;
#define ALL(a)              (a).begin(),(a).end()
#define SZ(v)               ((int)(v).size())
#define Clear(x)            memset(x , 0 , sizeof(x))
#define FOR(i,start,end)    for(int i = start ; i < end ; i++)
#define REP(i,start,end)    for(int i = start ; i >= end ; i--)
#define FOREACH(it,x)       for(it = (x.begin()) ; it != (x).end() ; it ++)

int main()// 78 - B. Help Chef Gerasim
{
    //freopen ("input.in","r",stdin) ;
    //ifstream cin("input.in") ;

    long long n , vol , avg = 0 ;
    vector < int > v ;
    cin >> n ;
    while(cin >> vol){
        avg += vol ;
        v.push_back(vol) ;
    }

    double temp1 = double(avg) / double(n) ;
    double temp2 = int(avg) / int(n) ;
    if(temp1 != temp2){
        cout << "Unrecoverable configuration." << endl ;
        return 0 ;
    }
    bool change = false ;
    avg /= n ;
    FOR(i , 0 , SZ(v)){
        if(v[i] != avg){
            change = true ;
            break ;
        }
    }// end of for(i)
    if(change == false){
        cout << "Exemplary pages." << endl ;
        return 0 ;
    }
    else if(change == true){
        FOR(i , 0 , SZ(v)){
            if(v[i] > avg){
                int rem = v[i] - avg ;
                FOR(j , 0 , SZ(v)){
                    if(i != j && v[j] + rem == avg){
                        cout << rem << " ml. from cup #" << j+1 << " to cup #" << i+1 << "." << endl ;
                        v[j] = avg ;
                        v[i] = avg ;
                        break ;
                    }
                }// end of for(j)
            }
        }// end of for(i)
    }
return 0 ;
}
/*
---------------------------------------------
Input:
---------
5
270
250
250
230
250

5
250
250
250
250
250

5
270
250
249
230
250
---------------------------------------------
Output:
---------
20 ml. from cup #4 to cup #1.
Exemplary pages.
Unrecoverable configuration.
---------------------------------------------
*/


#include <iostream>
using namespace std;
int n,i,j,a[1000],k[10001],diff;
int main()
{
 cin>>n;
 for (i=0;i<n;++i)
  {
   cin>>a[i];
   if (k[a[i]]==0) ++diff;
   k[a[i]]++;
  }
 if (diff==1) { cout<<"Exemplary pages."; return 0; }
 for (i=0;i<n;++i)
  for (j=0;j<n;++j)
   if ((a[i]+a[j])%2==0 && k[(a[i]+a[j])/2]==n-2 && a[i]>a[j])
   {
    cout<<a[i]-(a[i]+a[j])/2<<" ml. from cup #"<<j+1<<" to cup #"<<i+1<<'.';
    return 0;
   }
 cout<<"Unrecoverable configuration.";
}


#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <time.h>
#include <map>
#include <set>
using namespace std;
#define INF 100000000000
#define ord(a) (((int) a)-48)
#define size(a) ((int) a.size())
#define mp make_pair
#define EPS 0.001
#define pb push_back
#define ull unsigned long long
#define Pi 3.1415926535897932384626433832795
#define y1 y25432523452345
#define det(x1,y1,x2,y2) x1*y2-x2*y1
#define iroot(x) ((int) ceil(sqrt((double) (x))))
int n,m,other=0;
int mas[11111];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
scanf("%d",&n);
int maxim=0,minim=INF,minnumb,maxnumb;
for (int i=1;i<=n;++i)
{
   scanf("%d",&m);
   if (m>maxim)
   {
       maxnumb=i;
       maxim=m;
   }
   if (m<minim)
   {
       minnumb=i;
       minim=m;
   }
   if (mas[m]==0) other++;
   mas[m]++;
}
if (other==1) printf("Exemplary pages.\n");
else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
else printf("Unrecoverable configuration.\n");
return 0;
}


#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <time.h>
#include <map>
#include <set>
using namespace std;
#define INF 100000000000
#define ord(a) (((int) a)-48)
#define size(a) ((int) a.size())
#define mp make_pair
#define EPS 0.001
#define pb push_back
#define ull unsigned long long
#define Pi 3.1415926535897932384626433832795
#define y1 y25432523452345
#define det(x1,y1,x2,y2) x1*y2-x2*y1
#define iroot(x) ((int) ceil(sqrt((double) (x))))
int n,m,other=0;
int mas[11111];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
scanf("%d",&n);
int maxim=0,minim=INF,minnumb,maxnumb;
for (int i=1;i<=n;++i)
{
   scanf("%d",&m);
   if (m>maxim)
   {
       maxnumb=i;
       maxim=m;
   }
   if (m<minim)
   {
       minnumb=i;
       minim=m;
   }
   if (mas[m]==0) other++;
   mas[m]++;
}
if (other==1) printf("Exemplary pages.\n");
else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)*2,minnumb,maxnumb);
else printf("Unrecoverable configuration.\n");
return 0;
}


   #include <stdio.h>
   #include <iostream>
   #include <string>
   #include <algorithm>
   #include <vector>
   #include <queue>
   #include <stack>
   #include <cmath>
   #include <time.h>
   #include <map>
  #include <set>
   using namespace std;
   #define INF 100000000000
   #define ord(a) (((int) a)-48)
   #define size(a) ((int) a.size())
   #define mp make_pair
   #define EPS 0.001
   #define pb push_back
   #define ull unsigned long long
   #define Pi 3.1415926535897932384626433832795
   #define y1 y25432523452345
   #define det(x1,y1,x2,y2) x1*y2-x2*y1
   #define iroot(x) ((int) ceil(sqrt((double) (x))))
   int n,m,other=0;
   int mas[11111];
   int main()
   {
//   freopen("input.txt","r",stdin);
//   freopen("output.txt","w",stdout);
   scanf("%d",&n);
   int maxim=0,minim=INF,minnumb,maxnumb;
   for (int i=1;i<=n;++i)
   {
      scanf("%d",&m);
      if (m>maxim)
      {
          maxnumb=i;
          maxim=m;
     }
      if (m<minim)
      {
         minnumb=i;
          minim=m;
      }
      if (mas[m]==0) other++;
      mas[m]++;
   }
   if (other==1) printf("Exemplary pages.\n");
   else if (other==3 || other==2 && (maxim-minim)%2==0) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
   else printf("Unrecoverable configuration.\n");
   return 0;
   }


#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <time.h>
#include <map>
#include <set>
using namespace std;
#define INF 100000000000
#define ord(a) (((int) a)-48)
#define size(a) ((int) a.size())
#define mp make_pair
#define EPS 0.001
#define pb push_back
#define ull unsigned long long
#define Pi 3.1415926535897932384626433832795
#define y1 y25432523452345
#define det(x1,y1,x2,y2) x1*y2-x2*y1
#define iroot(x) ((int) ceil(sqrt((double) (x))))
int n,m,other=0;
int mas[11111];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
scanf("%d",&n);
int maxim=0,minim=INF,minnumb,maxnumb;
for (int i=1;i<=n;++i)
{
   scanf("%d",&m);
   if (m>maxim)
   {
       maxnumb=i;
       maxim=m;
   }
   if (m<minim)
   {
       minnumb=i;
       minim=m;
   }
   if (mas[m]==0) other++;
   mas[m]++;
}
if (n==2 && other==2) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
else
if (other==1) printf("Exemplary pages.\n");
else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
else printf("Unrecoverable configuration.\n");
return 0;
}


#pragma comment(linker,"/STACK:640000000")
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <string>

using namespace std;

int n , val ;

map <int , int> st , num ;

int main()
{
  //("input.txt","r",stdin); freopen("output.txt","w",stdout);
  scanf("%d",&n);
  for (int i = 1 ; ~scanf("%d",&val) ; i ++ )
      st[val] ++ , num[val] = i;
  if ( st.size() == 1 )
      printf("Exemplary pages.\n");
  else {
    if ( st.size() != 3 && st.size() != 2 )
        printf("Unrecoverable configuration.\n");
    else {
        int a = -1 , b = -1 ;
        for (map<int , int>::iterator it = st.begin() ; it != st.end() ; it ++ )
            if ( it->second == 1 ) {
                if ( a == -1 )
                    a = it->first;
                else
                    b = it->first;
            };
        if ( abs(b - a) % 2 == 1 || b == -1 || a == -1 )
            printf("Unrecoverable configuration.\n");
        else {
            if ( a > b )
                swap(a , b);
            printf("%d ml. from cup #%d to cup #%d.\n",(b - a) / 2,num[a],num[b]);
        };
    };
  };
  return 0;
}


#pragma comment(linker,"/STACK:640000000")
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <string>

using namespace std;

int n , val ;

map <int , int> st , num ;

int main()
{
  //("input.txt","r",stdin); freopen("output.txt","w",stdout);
  scanf("%d",&n);
  for (int i = 1 ; ~scanf("%d",&val) ; i ++ )
      st[val] ++ , num[val] = i;
  if ( st.size() == 1 )
      printf("Exemplary pages.\n");
  else {
    if ( st.size() != 3 && st.size() != 2 )
        printf("Unrecoverable configuration.\n");
    else {
        int a = -1 , b = -1 ;
        for (map<int , int>::iterator it = st.begin() ; it != st.end() ; it ++ )
            if ( it->second == 1 ) {
                if ( a == -1 )
                    a = it->first;
                else
                    b = it->first;
            };
        if ( abs(b - a) % 2 == 1 )
            printf("Unrecoverable configuration.\n");
        else {
            if ( a > b )
                swap(a , b);
            printf("%d ml. from cup #%d to cup #%d.\n",(b - a) / 2,num[a],num[b]);
        };
    };
  };
  return 0;
}


   #include <stdio.h>
   #include <iostream>
   #include <string>
   #include <algorithm>
   #include <vector>
   #include <queue>
   #include <stack>
   #include <cmath>
   #include <time.h>
   #include <map>
  #include <set>
   using namespace std;
   #define INF 100000000000
   #define ord(a) (((int) a)-48)
   #define size(a) ((int) a.size())
   #define mp make_pair
   #define EPS 0.001
   #define pb push_back
   #define ull unsigned long long
   #define Pi 3.1415926535897932384626433832795
   #define y1 y25432523452345
   #define det(x1,y1,x2,y2) x1*y2-x2*y1
   #define iroot(x) ((int) ceil(sqrt((double) (x))))
   int n,m,other=0;
   int mas[11111];
   int main()
   {
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
   scanf("%d",&n);
   int maxim=0,minim=INF,minnumb,maxnumb;
   for (int i=1;i<=n;++i)
   {
      scanf("%d",&m);
      if (m>maxim)
      {
          maxnumb=i;
          maxim=m;
     }
      if (m<minim)
      {
         minnumb=i;
          minim=m;
      }
      if (mas[m]==0) other++;
      mas[m]++;
   }
   if (other==1) printf("Exemplary pages.\n");
   else if (other==3 || other==2) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
   else printf("Unrecoverable configuration.\n");
   return 0;
   }


   #include <stdio.h>
   #include <iostream>
   #include <string>
   #include <algorithm>
   #include <vector>
   #include <queue>
   #include <stack>
   #include <cmath>
   #include <time.h>
   #include <map>
  #include <set>
   using namespace std;
   #define INF 100000000000
   #define ord(a) (((int) a)-48)
   #define size(a) ((int) a.size())
   #define mp make_pair
   #define EPS 0.001
   #define pb push_back
   #define ull unsigned long long
   #define Pi 3.1415926535897932384626433832795
   #define y1 y25432523452345
   #define det(x1,y1,x2,y2) x1*y2-x2*y1
   #define iroot(x) ((int) ceil(sqrt((double) (x))))
   int n,m,other=0;
   int mas[11111];
   int main()
   {
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   scanf("%d",&n);
   int maxim=0,minim=INF,minnumb,maxnumb;
   for (int i=1;i<=n;++i)
   {
      scanf("%d",&m);
      if (m>maxim)
      {
          maxnumb=i;
          maxim=m;
     }
      if (m<minim)
      {
         minnumb=i;
          minim=m;
      }
      if (mas[m]==0) other++;
      mas[m]++;
   }
   if (other==1) printf("Exemplary pages.\n");
   else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
   else printf("Unrecoverable configuration.\n");
   return 0;
   }


#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <time.h>
#include <map>
#include <set>
using namespace std;
#define INF 100000000000
#define ord(a) (((int) a)-48)
#define size(a) ((int) a.size())
#define mp make_pair
#define EPS 0.001
#define pb push_back
#define ull unsigned long long
#define Pi 3.1415926535897932384626433832795
#define y1 y25432523452345
#define det(x1,y1,x2,y2) x1*y2-x2*y1
#define iroot(x) ((int) ceil(sqrt((double) (x))))
int n,m,other=0;
int mas[111111];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
scanf("%d",&n);
int maxim=0,minim=INF,minnumb,maxnumb;
for (int i=1;i<=n;++i)
{
   scanf("%d",&m);
   if (m>maxim)
   {
       maxnumb=i;
       maxim=m;
   }
   if (m<minim)
   {
       minnumb=i;
       minim=m;
   }
   if (mas[m]==0) other++;
   mas[m]++;
}
if (other==1) printf("Exemplary pages.\n");
else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",maxim-minim,minnumb,maxnumb);
else printf("Unrecoverable configuration.\n");
return 0;
}


#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <time.h>
#include <map>
#include <set>
using namespace std;
#define INF 100000000000
#define ord(a) (((int) a)-48)
#define size(a) ((int) a.size())
#define mp make_pair
#define EPS 0.001
#define pb push_back
#define ull unsigned long long
#define Pi 3.1415926535897932384626433832795
#define y1 y25432523452345
#define det(x1,y1,x2,y2) x1*y2-x2*y1
#define iroot(x) ((int) ceil(sqrt((double) (x))))
int n,m,other=0;
int mas[11111];
int main()
{
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
scanf("%d",&n);
int maxim=0,minim=INF,minnumb,maxnumb;
for (int i=1;i<=n;++i)
{
   scanf("%d",&m);
   if (m>maxim)
   {
       maxnumb=i;
       maxim=m;
   }
   if (m<minim)
   {
       minnumb=i;
       minim=m;
   }
   if (mas[m]==0) other++;
   mas[m]++;
}
if ((maxim-minim)%2==1) printf("Unrecoverable configuration.\n");
else
if (n==2 && other==2) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
else
if (other==1) printf("Exemplary pages.\n");
else if (other==3) printf("%d ml. from cup #%d to cup #%d.\n",(maxim-minim)/2,minnumb,maxnumb);
else printf("Unrecoverable configuration.\n");
return 0;
}


#pragma comment(linker,"/STACK:640000000")
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <stack>
#include <queue>
#include <string>

using namespace std;

int n , val ;

map <int , int> st , num ;

int main()
{
  //("input.txt","r",stdin); freopen("output.txt","w",stdout);
  scanf("%d",&n);
  for (int i = 1 ; ~scanf("%d",&val) ; i ++ )
      st[val] ++ , num[val] = i;
  if ( st.size() == 1 )
      printf("Exemplary pages.\n");
  else {
    if ( st.size() != 3 )
        printf("Unrecoverable configuration.\n");
    else {
        int a = -1 , b = -1 ;
        for (map<int , int>::iterator it = st.begin() ; it != st.end() ; it ++ )
            if ( it->second == 1 ) {
                if ( a == -1 )
                    a = it->first;
                else
                    b = it->first;
            };
        if ( abs(b - a) % 2 == 1 )
            printf("Unrecoverable configuration.\n");
        else {
            if ( a > b )
                swap(a , b);
            printf("%d ml. from cup #%d to cup #%d.\n",(b - a) / 2,num[a],num[b]);
        };
    };
  };
  return 0;
}


#include <fstream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int cnt[100000];
int ind[100000];

int main()
{
	int n;
	cin >> n;
	vector<int> what;
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if(cnt[x] == 0)
			what.push_back(x);
		cnt[x]++;
		ind[x] = i+1;
	}
	sort(what.begin(),what.end());
	if(what.size() == 1)
		cout << "Exemplary pages.";
	else if(what.size() == 2)
	{
		if(n == 2 && (what[1] - what[0])%2 == 0)
			cout << (what[1] - what[0])/2 << " ml. from cup #" << ind[what[0]]
				 << " to cup #" << ind[what[1]];
		else
			cout << "Unrecoverable configuration.";
	}
	else if(what.size() == 3)
	{
		if(cnt[what[0]] == 1 && cnt[what[2]] == 1 && (what[2]-what[0])%2 == 0 &&
			(what[2]+what[0])/2 == what[1])
			cout << (what[2] - what[0])/2 << " ml. from cup #" << ind[what[0]]
				<< " to cup #" << ind[what[2]];
	}
	else
		cout << "Unrecoverable configuration.";
}


#include <fstream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int cnt[100000];
int ind[100000];

int main()
{
	int n;
	cin >> n;
	vector<int> what;
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if(cnt[x] == 0)
			what.push_back(x);
		cnt[x]++;
		ind[x] = i+1;
	}
	sort(what.begin(),what.end());
	if(what.size() == 1)
		cout << "Exemplary pages.";
	else if(what.size() == 2)
	{
		if(n == 2 && (what[1] - what[0])%2 == 0)
			cout << (what[1] - what[0])/2 << " ml. from cup #" << ind[what[0]]
				 << " to cup #" << ind[what[1]] << '.';
		else
			cout << "Unrecoverable configuration.";
	}
	else if(what.size() == 3)
	{
		if(cnt[what[0]] == 1 && cnt[what[2]] == 1 && (what[2]-what[0])%2 == 0 &&
			(what[2]+what[0])/2 == what[1])
			cout << (what[2] - what[0])/2 << " ml. from cup #" << ind[what[0]]
				<< " to cup #" << ind[what[2]] << '.';
	}
	else
		cout << "Unrecoverable configuration.";
}


#include <fstream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int cnt[100000];
int ind[100000];

int main()
{
	int n;
	cin >> n;
	vector<int> what;
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if(cnt[x] == 0)
			what.push_back(x);
		cnt[x]++;��
		ind[x] = i+1;
	}
	sort(what.begin(),what.end());
	if(what.size() == 1)
		cout << "Exemplary pages.";
	else if(what.size() == 2)
	{
		if(n == 2 && (what[1] - what[0])%2 == 0)
			cout << (what[1] - what[0])/2 << " ml. from cup #" << ind[what[0]]
		<< " to cup #" << ind[what[1]] << '.';
		else
			cout << "Unrecoverable configuration.";
	}
	else if(what.size() == 3)
	{
		if(cnt[what[0]] == 1 && cnt[what[2]] == 1 && (what[2]-what[0])%2 == 0 &&
			(what[2]+what[0])/2 == what[1])
			cout << (what[2] - what[0])/2 << " ml. from cup #" << ind[what[0]]
			<< " to cup #" << ind[what[2]] << '.';
		else
			cout << "Unrecoverable configuration.";
	}
	else
		cout << "Unrecoverable configuration.";
}


#include <fstream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

#ifdef ONLINE_JUDGE
#include <iostream>
#else
ifstream cin("input.txt");
ofstream cout("output.txt");
#endif

int cnt[100000];
int ind[100000];

int main()
{
	int n;
	cin >> n;
	vector<int> what;
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		if(cnt[x] == 0)
			what.push_back(x);
		cnt[x]++;
		ind[x] = i+1;
	}
	sort(what.begin(),what.end());
	if(what.size() == 1)
		cout << "Exemplary pages.";
	else if(what.size() == 2)
	{
		if(n == 2 && (what[1] - what[0])%2 == 0)
			cout << (what[1] - what[0])/2 << " ml. from cup #" << ind[what[0]]
		<< " to cup #" << ind[what[1]] << '.';
		else
			cout << "Unrecoverable configuration.";
	}
	else if(what.size() == 3)
	{
		if(cnt[what[0]] == 1 && cnt[what[2]] == 1 && (what[2]-what[0])%2 == 0 &&
			(what[2]+what[0])/2 == what[1])
			cout << (what[2] - what[0])/2 << " ml. from cup #" << ind[what[0]]
			<< " to cup #" << ind[what[2]] << '.';
		else
			cout << "Unrecoverable configuration.";
	}
	else
		cout << "Unrecoverable configuration.";
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
	int x;
	cin >> x;
	double y;
	int count = 0;
	int* arr = new int[x];
	int bigcup = -1, smallcup = -1, vol, bignum, smallnum;
	for (int i = 0; i<x; i++)
	{
		cin >> y;
		arr[i] = y;
		count += y;
	}
	y = count;
	y /= x;
	int count2 = 0;
	for (int i = 0; i<x; i++)
	{
		if (y != arr[i])
			count2++;
	}
	if (count2 == 0)
	{
		cout << "Exemplary pages." << endl;
		return 0;
	}
	else if (count2>2 || count2 == 1 || y - int(y) != 0)
	{
		cout << "Unrecoverable configuration." << endl;

		return 0;
	}
	else {
		for (int i = 0; i<x; i++)
		{
			if (y != arr[i])
			{
				if (arr[i]>y)
				{
					bignum = i + 1;
					bigcup = arr[i];
				}
				else
				{
					smallnum = i + 1;
					smallcup = arr[i];
				}
			}
		}
		if ((bigcup == -1 || smallcup == -1) && count2 != 0)
		{
			cout << "Unrecoverable configuration." << endl;

			return 0;
		}
		else {
			vol = (bigcup - y);
			cout << vol << " ml. from cup#" << smallnum << " to cup #" << bignum << "." << endl;

			return 0;
		}
	}
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
	int x;
	cin >> x;
	double y;
	int count = 0;
	int* arr = new int[x];
	int bigcup = -1, smallcup = -1, vol, bignum, smallnum;
	for (int i = 0; i<x; i++)
	{
		cin >> y;
		arr[i] = y;
		count += y;
	}
	y = count;
	y /= x;
	int count2 = 0;
	for (int i = 0; i<x; i++)
	{
		if (y != arr[i])
			count2++;
	}
	if (count2 == 0)
	{
		cout << "Exemplary pages." << endl;
		system("pause");
		return 0;
	}
	else if (count2>2 || count2 == 1 || y - int(y) != 0)
	{
		cout << "Unrecoverable configuration." << endl;
		system("pause");
		return 0;
	}
	else {
		for (int i = 0; i<x; i++)
		{
			if (y != arr[i])
			{
				if (arr[i]>y)
				{
					bignum = i + 1;
					bigcup = arr[i];
				}
				else
				{
					smallnum = i + 1;
					smallcup = arr[i];
				}
			}
		}
		if ((bigcup == -1 || smallcup == -1) && count2 != 0)
		{
			cout << "Unrecoverable configuration." << endl;
			system("pause");
			return 0;
		}
		else {
			vol = (bigcup - y);
			cout << vol << " ml. from cup #" << smallnum << " to cup #" << bignum << "." << endl;
				system("pause");
			return 0;
		}
	}
	system("pause");
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main()
{
	int x;
	cin >> x;
	double y;
	int count = 0;
	int* arr = new int[x];
	int bigcup = -1, smallcup = -1, vol, bignum, smallnum;
	for (int i = 0; i<x; i++)
	{
		cin >> y;
		arr[i] = y;
		count += y;
	}
	y = count;
	y /= x;
	int count2 = 0;
	for (int i = 0; i<x; i++)
	{
		if (y != arr[i])
			count2++;
	}
	if (count2 == 0)
	{
		cout << "Exemplary pages." << endl;
		return 0;
	}
	else if (count2>2 || count2 == 1 || y - int(y) != 0)
	{
		cout << "Unrecoverable configuration." << endl;
		return 0;
	}
	else {
		for (int i = 0; i<x; i++)
		{
			if (y != arr[i])
			{
				if (arr[i]>y)
				{
					bignum = i + 1;
					bigcup = arr[i];
				}
				else
				{
					smallnum = i + 1;
					smallcup = arr[i];
				}
			}
		}
		if ((bigcup == -1 || smallcup == -1) && count2 != 0)
		{
			cout << "Unrecoverable configuration." << endl;
			return 0;
		}
		else {
			vol = (bigcup - y);
			cout << vol << " ml. from cup #" << smallnum << " to cup #" << bignum << "." << endl;
			return 0;
		}
	}
}


#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
    int n;
    int V[1100];
    cin>>n;
    int sum=0;
    int flag=1;
    for(int i=1;i<=n;i++)
    {
        cin>>V[i];
        sum+=V[i];
        if(i>1)if(V[i]!=V[i-1])flag=0;
    }
    if(flag==1)cout<<"Exemplary pages."<<endl;
    else if(sum%n!=0)cout<<"Unrecoverable configuration."<<endl;
    else
    {
        int avg=sum/n;
        int i,j;
        for(i=1;i<=n;i++)
        {
            if(V[i]!=avg)break;
        }
        for(j=i+1;j<=n;j++)
        if(V[i]+V[j]==avg*2)break;
        int delta=V[i]-avg;
        V[i]=avg;V[j]=avg;
        for(int t=1;t<=n;t++)
        if(V[t]!=avg)flag=1;
        if(flag==1)cout<<"Unrecoverable configuration."<<endl;
        else
        if(delta>0)printf("%d ml. from cup #%d to cup #%d.",delta,j,i);
        else printf("%d ml. from cup #%d to cup #%d.",-delta,i,j);
    }

}


#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
    int n;
    int V[1100];
    cin>>n;
    int sum=0;
    int flag=1;
    for(int i=1;i<=n;i++)
    {
        cin>>V[i];
        sum+=V[i];
        if(i>1)if(V[i]!=V[i-1])flag=0;
    }
    if(flag==1)cout<<"Exemplary pages."<<endl;
    else if(sum%n!=0)cout<<"Unrecoverablent configuration."<<endl;
    else
    {
        int avg=sum/n;
        int i,j;
        for(i=1;i<=n;i++)
        {
            if(V[i]!=avg)break;
        }
        for(j=i+1;j<=n;j++)
        if(V[i]+V[j]==avg*2)break;
        int delta=V[i]-avg;
        V[i]=avg;V[j]=avg;
        for(int t=1;t<=n;t++)
        if(V[t]!=avg)flag=1;
        if(flag==1)cout<<"Unrecoverablent configuration."<<endl;
        else
        if(delta>0)printf("%d ml. from cup #%d to cup #%d.",delta,j,i);
        else printf("%d ml. from cup #%d to cup #%d.",-delta,i,j);
    }

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>

#define MP make_pair
#define VI vector<int>
#define PI 3.14159265358979
#define LL long long
using namespace std;

int main()
{
	//freopen ( "in.txt", "r", stdin );
	//freopen ( "out.txt", "w", stdout );
	int n;
	int a[1001];
	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.\n" );
		return 0;
	}
	int less = 0, more = 0, lessID, moreID, ave = sum / n;
	for( int i = 0; i < n; ++ i )
	{
		if( a[i] > ave ) more ++, moreID = i + 1;
		if( a[i] < ave ) less ++, lessID = i + 1;
	}
	if( less == 1 && more == 1 )
	{
		printf( "%d ml. from cup #%d to cup #%d.\n", ave - a[lessID - 1], moreID, lessID );
		return 0;
	}
	if( less == 0 && more == 0 )
	{
		printf( "Exemplary pages.\n" );
		return 0;
	}
	printf( "Unrecoverable configuration.\n" );
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <memory.h>

#define MP make_pair
#define VI vector<int>
#define PI 3.14159265358979
#define LL long long
using namespace std;

int main()
{
	//freopen ( "in.txt", "r", stdin );
	//freopen ( "out.txt", "w", stdout );
	int n;
	int a[1001];
	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.\n" );
		return 0;
	}
	int less = 0, more = 0, lessID, moreID, ave = sum / n;
	for( int i = 0; i < n; ++ i )
	{
		if( a[i] > ave ) more ++, moreID = i + 1;
		if( a[i] < ave ) less ++, lessID = i + 1;
	}
	if( less == 1 && more == 1 )
	{
		printf( "%d ml. from cup #%d to cup #%d.\n", ave - a[lessID - 1], lessID, moreID );
		return 0;
	}
	if( less == 0 && more == 0 )
	{
		printf( "Exemplary pages.\n" );
		return 0;
	}
	printf( "Unrecoverable configuration.\n" );
	return 0;
}


// rc.cpp
//

#include <math.h>
#include <string.h>

#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <algorithm>
#include <numeric>

using namespace std;

typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned __int64 uint64;

#define PI 3.1415926535897932384626433832795
#define EPS 1E-8

pair<uint, uint> v[1000];
int main(int argc, char* argv[])
{
	uint n;
	cin >> n;

	for (uint i = 0; i < n; ++i)
	{
		cin >> v[i].first;
		v[i].second = i;
	}
	sort(v, v + n);

	pair<uint, uint>* b = v,
					* e = v + n - 1;

	uint t = 0;
	if (b->first != e->first)
	{
		++b;
		t = n - 1;
		uint v0 = b->first;
		for (;b != e; ++b)
		{
			if (b->first != v0)
			{
				t = 2000;
				break;
			}
		}

		if (t != 2000 && v[0].first + e->first != 2 * v0)
			t = 2000;
	}

	if (t == 0)
		cout << "Exemplary pages." << endl;
	else if (t == 2000)
		cout << "Unrecoverable configuration." << endl;
	else
		cout << v[1].first - v[0].first << " ml. from cup #" << v[0].second + 1 << " to cup #" << v[t].second + 1 << "." << endl;

	return 0;
}


// rc.cpp
//

#include <math.h>
#include <string.h>

#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <algorithm>
#include <numeric>

using namespace std;

typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned __int64 uint64;

#define PI 3.1415926535897932384626433832795
#define EPS 1E-8

pair<uint, uint> v[1000];
int main(int argc, char* argv[])
{
	uint n;
	cin >> n;

	uint m = 0;
	for (uint i = 0; i < n; ++i)
	{
		cin >> v[i].first;
		v[i].second = i;
		m += v[i].first;
	}
	m /= n;
	sort(v, v + n);

	pair<uint, uint>* b = v,
					* e = v + n - 1;

	uint t = 0;
	if (b->first != e->first)
	{
		++b;
		t = n - 1;
		for (;b != e; ++b)
		{
			if (b->first != m)
			{
				t = 2000;
				break;
			}
		}

		if (t != 2000 && v[0].first + e->first != 2 * m)
			t = 2000;
	}

	if (t == 0)
		cout << "Exemplary pages." << endl;
	else if (t == 2000)
		cout << "Unrecoverable configuration." << endl;
	else
		cout << m - v[0].first << " ml. from cup #" << v[0].second + 1 << " to cup #" << v[t].second + 1 << "." << endl;

	return 0;
}


// rc.cpp
//

#include <math.h>
#include <string.h>

#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <algorithm>
#include <numeric>

using namespace std;

typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned __int64 uint64;

#define PI 3.1415926535897932384626433832795
#define EPS 1E-8

pair<uint, uint> v[1000];
int main(int argc, char* argv[])
{
	uint n;
	cin >> n;

	uint m = 0;
	for (uint i = 0; i < n; ++i)
	{
		cin >> v[i].first;
		v[i].second = i;
		m += v[i].first;
	}
	m /= n;
	sort(v, v + n);

	pair<uint, uint>* b = v,
					* e = v + n - 1;

	uint t = 0;
	if (b->first != e->first)
	{
		++b;
		t = n - 1;
		for (;b != e; ++b)
		{
			if (b->first != n)
			{
				t = 2000;
				break;
			}
		}

		if (t != 2000 && v[0].first + e->first != 2 * m)
			t = 2000;
	}

	if (t == 0)
		cout << "Exemplary pages." << endl;
	else if (t == 2000)
		cout << "Unrecoverable configuration." << endl;
	else
		cout << m - v[0].first << " ml. from cup #" << v[0].second + 1 << " to cup #" << v[t].second + 1 << "." << endl;

	return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;

struct juice{
    int ind,volume;
    bool operator <(const juice& rhs) const{
        return volume<rhs.volume;
    }
};
int n;
juice a[1000];

void init(){
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&a[i].volume);
        a[i].ind=i+1;
    }
}

void solve(){
    sort(a,a+n);
    if(n==1){
        printf("Exemplary pages.\n");
        return;
    }
    if(n==2){
        if((a[0].volume+a[1].volume)%2){
            printf("Unrecoverable configuration.\n");
        }else{
            printf("%d ml. from cup #%d to cup #%d.\n",(a[1].volume-a[0].volume)/2,a[0].ind,a[1].ind);
        }
        return;
    }

    if(a[0].volume==a[n-1].volume){
        printf("Exemplary pages.\n");
        return;
    }
    if(a[0].volume+a[n-1].volume!=2*a[1].volume){
        printf("Unrecoverable configuration.\n");
        return;
    }
    if(a[n-2].volume!=a[1].volume){
        printf("Unrecoverable configuration.\n");
        return;
    }
    printf("%d ml. from cup #%d to cup #%d.\n",(a[n-1].volume-a[0].volume)/2,a[0].ind,a[n-1].ind);
}

int main(){
    init();
    solve();
    return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;

struct juice{
    int ind,volume;
    bool operator <(const juice& rhs) const{
        return volume<rhs.volume;
    }
};
int n;
juice a[1000];

void init(){
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&a[i].volume);
        a[i].ind=i+1;
    }
}

void solve(){
    sort(a,a+n);
    if(n==1){
        printf("Exemplary pages.\n");
        return;
    }
    if(n==2){
        if(a[0].volume==a[1].volume){
            printf("Exemplary pages.\n");
        }else if((a[0].volume+a[1].volume)%2){
            printf("Unrecoverable configuration.\n");
        }else{
            printf("%d ml. from cup #%d to cup #%d.\n",(a[1].volume-a[0].volume)/2,a[0].ind,a[1].ind);
        }
        return;
    }

    if(a[0].volume==a[n-1].volume){
        printf("Exemplary pages.\n");
        return;
    }
    if(a[0].volume+a[n-1].volume!=2*a[1].volume){
        printf("Unrecoverable configuration.\n");
        return;
    }
    if(a[n-2].volume!=a[1].volume){
        printf("Unrecoverable configuration.\n");
        return;
    }
    printf("%d ml. from cup #%d to cup #%d.\n",(a[n-1].volume-a[0].volume)/2,a[0].ind,a[n-1].ind);
}

int main(){
    init();
    solve();
    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
    map <int,vector <int > > m;
    vector <int> v;
    int i,n,a,k=0;
    cin>>n;
    bool flag=true;
    for(i=0;i<=n-1;i++)
    {
        scanf("%d",&a);
        if(m[a].size()==0)
        {
            k++;
            v.push_back(a);
        }
        m[a].push_back(i);
        if(k>3)
        {
            flag=false;
            break;
        }
    }
    if(!flag || k<3 && k>1)
        printf("Unrecoverable configuration.\n");
    else
        if(k==1)
            printf("Exemplary pages.\n");
        else
        {
            sort(v.begin(),v.begin()+3);
            if(m[v[1]].size()<n-2 || (v[1]-v[0])!=(v[2]-v[1]))
                printf("Unrecoverable configuration.\n");
            else
                printf("%d ml. from cup #%d to cup #%d.\n",v[1]-v[0],m[v[0]][0]+1,m[v[2]][0]+1);
        }
    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
    map <int,vector <int > > m;
    vector <int> v;
    int i,n,a,k=0;
    cin>>n;
    bool flag=true;
    for(i=0;i<=n-1;i++)
    {
        scanf("%d",&a);
        if(m[a].size()==0)
        {
            k++;
            v.push_back(a);
        }
        m[a].push_back(i);
        if(k>3)
        {
            flag=false;
            break;
        }
    }
    if(!flag || k<3 && k>1)
        printf("Unrecoverable configuration.\n");
    else
        if(k==1)
            printf("Exemplary pages.\n");
        else
        {
            sort(v.begin(),v.begin()+3);
            if(m[v[1]].size()<n-2 || (v[1]-v[0])!=(v[2]-v[1]))
                printf("Unrecoverable configuration.\n");
            else
                printf("%d ml. from cup #%d to cup #%d.\n",v[1]-v[0],m[v[2]][0]+1,m[v[0]][0]+1);
        }
    return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
    map <int,vector <int > > m;
    vector <int> v;
    int i,n,a,k=0;
    cin>>n;
    bool flag=true;
    for(i=0;i<=n-1;i++)
    {
        scanf("%d",&a);
        if(m[a].size()==0)
        {
            k++;
            v.push_back(a);
        }
        m[a].push_back(i);
        if(k>3)
        {
            flag=false;
            break;
        }
    }
    if(k==2 && n==2)
    {
        sort(v.begin(),v.begin()+2);
        if(((v[1]+v[0])/2-v[0])==(v[1]-(v[1]+v[0])/2))
            printf("%d ml. from cup #%d to cup #%d.\n",v[1]-(v[1]+v[0])/2,m[v[0]][0]+1,m[v[1]][0]+1);
        else
            printf("Unrecoverable configuration.\n");
    }
    else
        if(!flag || k<3 && k>1)
            printf("Unrecoverable configuration.\n");
        else
            if(k==1)
                printf("Exemplary pages.\n");
            else
            {
                sort(v.begin(),v.begin()+3);
                if(m[v[1]].size()<n-2 || (v[1]-v[0])!=(v[2]-v[1]))
                    printf("Unrecoverable configuration.\n");
                else
                    printf("%d ml. from cup #%d to cup #%d.\n",v[1]-v[0],m[v[0]][0]+1,m[v[2]][0]+1);
            }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> mas;
	map<int, int> myMap;
	for(int i = 0; i < n; i++){
		int buf;
		cin >> buf;
		mas.push_back(buf);
		myMap[buf]++;
	}

	if(myMap.size() == 1){
		cout << "Exemplary pages."<<endl;
		return 0;
	}
	if(myMap.size() >=4 || myMap.size() == 2){
		cout << "Unrecoverable configuration."<<endl;
		return 0;
	}
	bool massive = false;
	int massiv = 0;
	vector<int> xy;
	for(auto it = myMap.begin(); it != myMap.end(); it++){
		if(massive && it->second != 1){
			cout << "Unrecoverable configuration."<<endl;
			return 0;
		}
		if(it->second != 1) {
			massive = true;
			massiv = it->first;
			continue;
		}
		xy.push_back(it->first);
	}
	int a, b;
	if(((xy[0] + xy[1]) % 2) == 0 && ((xy[0] + xy[1]) / 2) == massiv){
		if(xy[0] > xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					a = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					b = i+1;
					continue;
				}
			}
		}
		if(xy[0] < xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					b = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					a = i+1;
					continue;
				}
			}
		}

		cout << abs(xy[0] - xy[1])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
	}else{
		cout << "Unrecoverable configuration."<<endl;
			return 0;
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> cups;
	set<int> diff;
	int imax = 0; int imin = 0;
	int countmax = 0; int countmin = 0;
	int min = 11111;
	int max = -1;

	for (int i = 0; i < n; i++)
	{
		int temp;
		cin >> temp;
		cups.push_back(temp);
		diff.insert(temp);
		if (max == temp) countmax++;
		if (min == temp) countmin++;
		if (max < temp) {max = temp; imax = i+1; countmax = 1;}
		if (min > temp) {min = temp; imin = i+1; countmin = 1;}
	}

	if (diff.size() == 1) {cout << "Exemplary pages."; return 0;}
	if (countmax != 1 || countmin != 1) {cout << "Unrecoverable configuration."; return 0;}
	if (diff.size() == 2 && (max - min) % 2 == 0) {cout << (max - min)/2 << " ml. from cup #" << imin << " to cup #" << imax << "."; return 0;}

	else if (diff.size() != 3 ) {cout << "Unrecoverable configuration."; return 0;}
	else
	{
		for (int i = 0; i < n; i++)
		{
			if (max != cups[i] && min != cups[i])
			{
				if (((max - min) % 2 == 0) && ((max - min) / 2 == max - cups[i]))
				{
					cout << max - cups[i] << " ml. from cup #" << imin << " to cup #" << imax << ".";
				}
				else cout << "Unrecoverable configuration.";
				return 0;
			}
		}
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> mas;
	map<int, int> myMap;
	for(int i = 0; i < n; i++){
		int buf;
		cin >> buf;
		mas.push_back(buf);
		myMap[buf]++;
	}

	if(myMap.size() == 1){
		cout << "Exemplary pages"<<endl;
		return 0;
	}
	if(myMap.size() >=4 || myMap.size() == 2){
		cout << "Unrecoverable configuration"<<endl;
		return 0;
	}
	bool massive = false;
	int massiv = 0;
	vector<int> xy;
	for(auto it = myMap.begin(); it != myMap.end(); it++){
		if(massive && it->second != 1){
			cout << "Unrecoverable configuration"<<endl;
			return 0;
		}
		if(it->second != 1) {
			massive = true;
			massiv = it->first;
			continue;
		}
		xy.push_back(it->first);
	}
	int a, b;
	if(((xy[0] + xy[1]) % 2) == 0 && ((xy[0] + xy[1]) / 2) == massiv){
		if(xy[0] > xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					a = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					b = i+1;
					continue;
				}
			}
		}
		if(xy[0] < xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					b = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					a = i+1;
					continue;
				}
			}
		}

		cout << abs(xy[0] - xy[1])/2 << "ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
	}else{
		cout << "Unrecoverable configuration"<<endl;
			return 0;
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> mas;
	map<int, int> myMap;
	for(int i = 0; i < n; i++){
		int buf;
		cin >> buf;
		mas.push_back(buf);
		myMap[buf]++;
	}

	if(myMap.size() == 1){
		cout << "Exemplary pages."<<endl;
		return 0;
	}
	if(myMap.size() >=4 || myMap.size() == 2){
		cout << "Unrecoverable configuration."<<endl;
		return 0;
	}
	int a, b;
	if(n == 3 && myMap.size() == 3){
		if(((mas[0] + mas[1]) % 2) == 0 && ((mas[0] + mas[1]) / 2) == mas[2]){
			if( mas[0] > mas[1]){
				a = 1;
				b = 2;
			}else{
				a= 2;
				b = 1;
			}
		cout << abs(mas[0] - mas[1])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
		}

		if(((mas[2] + mas[1]) % 2) == 0 && ((mas[2] + mas[1]) / 2) == mas[0]){
			if( mas[2] > mas[1]){
				a = 3;
				b = 2;
			}else{
				a= 2;
				b = 3;
			}
		cout << abs(mas[2] - mas[1])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
		}

		if(((mas[2] + mas[0]) % 2) == 0 && ((mas[2] + mas[0]) / 2) == mas[1]){
			if( mas[2] > mas[0]){
				a = 3;
				b = 1;
			}else{
				a= 1;
				b = 3;
			}
		cout << abs(mas[2] - mas[0])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
		}

	}

	bool massive = false;
	int massiv = 0;
	vector<int> xy;
	for(auto it = myMap.begin(); it != myMap.end(); it++){
		if(massive && it->second != 1){
			cout << "Unrecoverable configuration."<<endl;
			return 0;
		}
		if(it->second != 1) {
			massive = true;
			massiv = it->first;
			continue;
		}
		xy.push_back(it->first);
	}

	if(((xy[0] + xy[1]) % 2) == 0 && ((xy[0] + xy[1]) / 2) == massiv){
		if(xy[0] > xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					a = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					b = i+1;
					continue;
				}
			}
		}
		if(xy[0] < xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					b = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					a = i+1;
					continue;
				}
			}
		}

		cout << abs(xy[0] - xy[1])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
	}else{
		cout << "Unrecoverable configuration."<<endl;
			return 0;
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> cups;
	set<int> diff;
	int imax = 0; int imin = 0;
	int countmax = 0; int countmin = 0;
	int min = 11111;
	int max = -1;

	for (int i = 0; i < n; i++)
	{
		int temp;
		cin >> temp;
		cups.push_back(temp);
		diff.insert(temp);
		if (max == temp) countmax++;
		if (min == temp) countmin++;
		if (max < temp) {max = temp; imax = i+1; countmax = 1;}
		if (min > temp) {min = temp; imin = i+1; countmin = 1;}
	}

	if (countmax != 1 || countmin != 1) {cout << "Unrecoverable configuration."; return 0;}
	if (diff.size() == 2 && (max - min) % 2 == 0) {cout << (max - min)/2 << " ml. from cup #" << imin << " to cup #" << imax << "."; return 0;}

	if (diff.size() == 1) {cout << "Exemplary pages."; return 0;}
	else if (diff.size() != 3 ) {cout << "Unrecoverable configuration."; return 0;}
	else
	{
		for (int i = 0; i < n; i++)
		{
			if (max != cups[i] && min != cups[i])
			{
				if (((max - min) % 2 == 0) && ((max - min) / 2 == max - cups[i]))
				{
					cout << max - cups[i] << " ml. from cup #" << imin << " to cup #" << imax << ".";
				}
				else cout << "Unrecoverable configuration.";
				return 0;
			}
		}
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> cups;
	set<int> diff;
	int imax = 0; int imin = 0;
	int min = 11111;
	int max = -1;

	for (int i = 0; i < n; i++)
	{
		int temp;
		cin >> temp;
		cups.push_back(temp);
		diff.insert(temp);
		if (max < temp) {max = temp; imax = i+1;}
		if (min > temp) {min = temp; imin = i+1;}
	}

	if (diff.size() == 2 && (max - min) % 2 == 0) {cout << (max - min)/2 << " ml. from cup #" << imin << " to cup #" << imax << "."; return 0;}

	if (diff.size() == 1) {cout << "Exemplary pages."; return 0;}
	else if (diff.size() != 3) {cout << "Unrecoverable configuration."; return 0;}
	else
	{
		for (int i = 0; i < n; i++)
		{
			if (max != cups[i] && min != cups[i])
			{
				if (((max - min) % 2 == 0) && ((max - min) / 2 == max - cups[i]))
				{
					cout << max - cups[i] << " ml. from cup #" << imin << " to cup #" << imax << ".";
				}
				else cout << "Unrecoverable configuration.";
				return 0;
			}
		}
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> mas;
	map<int, int> myMap;
	for(int i = 0; i < n; i++){
		int buf;
		cin >> buf;
		mas.push_back(buf);
		myMap[buf]++;
	}

	if(myMap.size() == 1){
		cout << "Exemplary pages"<<endl;
		return 0;
	}
	if(myMap.size() >=4 || myMap.size() == 2){
		cout << "Unrecoverable configuration"<<endl;
		return 0;
	}
	bool massive = false;
	int massiv = 0;
	vector<int> xy;
	for(auto it = myMap.begin(); it != myMap.end(); it++){
		if(massive && it->second != 1){
			cout << "Unrecoverable configuration"<<endl;
			return 0;
		}
		if(it->second != 1) {
			massive = true;
			massiv = it->first;
			continue;
		}
		xy.push_back(it->first);
	}
	int a, b;
	if(((xy[0] + xy[1]) % 2) == 0 && ((xy[0] + xy[1]) / 2) == massiv){
		if(xy[0] > xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					a = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					b = i+1;
					continue;
				}
			}
		}
		if(xy[0] < xy[1]){
			for(int i = 0; i < n; i++){
				if(mas[i] == xy[0]){
					b = i+1;
					continue;
				}
				if(mas[i] == xy[1]){
					a = i+1;
					continue;
				}
			}
		}

		cout << abs(xy[0] - xy[1])/2 << " ml. from cup #" << b << " to cup #" << a <<"."<<endl;
		return 0;
	}else{
		cout << "Unrecoverable configuration"<<endl;
			return 0;
	}

    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <hash_map>
#include <hash_set>
#include <algorithm>
#include <queue>
#include <sstream>
#include <iterator>
#include <set>
#include <map>
using namespace std;
typedef long long LL;
#define mems(mas, val) memset(mas, val, sizeof(mas))
#define forn(it, from, to) for(int it = from; it < to; ++it)
#define mp(a,b) make_pair(a, b)

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

	int n;
	cin >> n;
	vector<int> cups;
	set<int> diff;
	int imax = 0; int imin = 0;
	int min = 11111;
	int max = -1;

	for (int i = 0; i < n; i++)
	{
		int temp;
		cin >> temp;
		cups.push_back(temp);
		diff.insert(temp);
		if (max < temp) {max = temp; imax = i+1;}
		if (min > temp) {min = temp; imin = i+1;}
	}

	if (diff.size() == 1) {cout << "Exemplary pages."; return 0;}
	else if (diff.size() != 3) {cout << "Unrecoverable configuration."; return 0;}
	else
	{
		for (int i = 0; i < n; i++)
		{
			if (max != cups[i] && min != cups[i])
			{
				if (((max - min) % 2 == 0) && ((max - min) / 2 == max - cups[i]))
				{
					cout << max - cups[i] << " ml. from cup #" << imin << " to cup #" << imax << ".";
				}
				else cout << "Unrecoverable configuration.";
				return 0;
			}
		}
	}

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) > 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->X, it->Y ) );
        ++it;
    }
    SORT(vec);

    int min = vec.front().X, minCount = vec.front().Y;
    int max = vec.back().X, maxCount = vec.back().Y;

    int flow = max - min;
    if ( minCount == 1 && maxCount == 1 && flow % 2 == 0 &&
          (SZ(vec) == 2 ||
              (max - flow/2 == vec[ 1 ].X && min + flow/2 == vec[ 1 ].X)) )
    {
        int minID, maxID;
        REP(i,N)
        {
            if ( v[ i ] == min )
                minID = i;
            if ( v[ i ] == max )
                maxID = i;
        }
        printf( "%d ml. from cup #%d to cup #%d.\n", flow/2, minID + 1, maxID + 1 );
        return 0;
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) > 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->Y, it->X ) );
        ++it;
    }
    SORT(vec);

    if ( vec[ 0 ].X == 1 && vec[ 1 ].X == 1 )
    {
        int min = numeric_limits< int >::max(), max = numeric_limits< int >::min();
        int minID, maxID;
        REP(i,N)
            if ( v[ i ] < min )
            {
                min = v[ i ];
                minID = i;
            }
            else if ( v[ i ] > max )
            {
                max = v[ i ];
                maxID = i;
            }

        int flow = (v[ maxID ] - v[ minID ]) / 2;
        if ( SZ(vec) == 2 ||
              (v[ maxID ] - flow == vec[ 2 ].Y && v[ minID ] + flow == vec[ 2 ].Y) )
            printf( "%d ml. from cup #%d to cup #%d.\n", flow, minID + 1, maxID + 1 );
        return 0;
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) > 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->Y, it->X ) );
        ++it;
    }
    SORT(vec);

    if ( vec[ 0 ].X == 1 && vec[ 1 ].X == 1 )
    {
        int min = numeric_limits< int >::max(), max = numeric_limits< int >::min();
        int minID, maxID;
        REP(i,N)
        {
            if ( v[ i ] < min )
            {
                min = v[ i ];
                minID = i;
            }
            if ( v[ i ] > max )
            {
                max = v[ i ];
                maxID = i;
            }
        }

        int flow = (v[ maxID ] - v[ minID ]) / 2;
        if ( flow % 2 == 0 )
        {
            if ( SZ(vec) == 2 ||
                  (v[ maxID ] - flow == vec[ 2 ].Y && v[ minID ] + flow == vec[ 2 ].Y) )
            {
                printf( "%d ml. from cup #%d to cup #%d.\n", flow, minID + 1, maxID + 1 );
                return 0;
            }
        }
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) > 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->Y, it->X ) );
        ++it;
    }
    SORT(vec);

    if ( vec[ 0 ].X == 1 && vec[ 1 ].X == 1 )
    {
        int min = numeric_limits< int >::max(), max = numeric_limits< int >::min();
        int minID, maxID;
        REP(i,N)
        {
            if ( v[ i ] < min )
            {
                min = v[ i ];
                minID = i;
            }
            if ( v[ i ] > max )
            {
                max = v[ i ];
                maxID = i;
            }
        }

        int flow = (v[ maxID ] - v[ minID ]);
        if ( flow % 2 == 0 )
        {
            flow /= 2;
            if ( SZ(vec) == 2 ||
                  (v[ maxID ] - flow == vec[ 2 ].Y && v[ minID ] + flow == vec[ 2 ].Y) )
            {
                printf( "%d ml. from cup #%d to cup #%d.\n", flow, minID + 1, maxID + 1 );
                return 0;
            }
        }
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) != 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->Y, it->X ) );
        ++it;
    }
    SORT(vec);

    if ( vec[ 0 ].X == 1 && vec[ 1 ].X == 1 )
    {
        int j, k;
        REP(i,N)
            if ( v[ i ] < vec[ 2 ].Y )
                j = i;
            else if ( v[ i ] > vec[ 2 ].Y )
                k = i;

        int flow = (v[ k ] - v[ j ]) / 2;
        if ( v[ k ] - flow == vec[ 2 ].Y &&
              v[ j ] + flow == vec[ 2 ].Y )
            printf( "%d ml. from cup #%d to cup #%d.\n", flow, j + 1, k + 1 );
        return 0;
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <sstream>
#include <utility>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cmath>
#include <ctime>
#include <assert.h>
#include <string.h>
#include <limits>
using namespace std;

#define INF 100000000
#define PI 3.1415926535897932384626433832795
#define PI_HALF 1.570796327
#define EPS 1e-9

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair< int, int > PII;
typedef pair< LL, LL > PLL;
typedef vector< int > VI;
typedef vector< LL > VLL;
typedef vector< string > VS;
typedef vector< PII > VPII;
typedef vector< PLL > VPLL;

#define X first
#define Y second
#define PB push_back
#define MP make_pair
#define SZ(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort( ALL( c ) )
#define SORT_(c,f) sort( ALL( c ), f )
#define FILL(x,v) memset( x, v, sizeof( x ) );

#define REP(i,n) for ( int i = 0, max_ = (n); i < max_; ++i )
#define REPD(i,n) for ( int i = (n) - 1; i >= 0; --i )
#define FOR(i,a,b) for ( int i = (a), max_ = (b); i < max_; ++i )
#define FORD(i,a,b) for ( int i = (a) - 1, min_ = (b); i >= min_; --i )

int ToInt ( string & s, int len ) { int r = 0; REP(i,len) { r *= 10; r += s[i] - '0'; } return r; }
int GCD ( int a, int b ) { return b != 0 ? GCD(b, a % b) : a; }
int LCM ( int a, int b ) { return a*(b / GCD(a,b)); }
LL Pow ( LL n, LL e ) { if ( e == 0 ) return 1; if ( e == 1 ) return n; else if ( e & 1 ) { LL t = Pow(n,e/2); return n*t*t; } else { LL t = Pow(n,e/2); return t*t; } }

int v[ 1001 ];

int main ()
{
    int N;
    scanf( "%d", &N );
    REP(i,N) scanf( "%d", &v[ i ] );

    map< int, int > m;
    REP(i,N) ++m[ v[ i ] ];
    if ( SZ(m) == 1 )
    {
        printf( "Exemplary pages.\n" );
        return 0;
    }
    if ( SZ(m) > 3 )
    {
        printf( "Unrecoverable configuration.\n" );
        return 0;
    }

    VPII vec;
    auto it = m.begin();
    while ( it != m.end() )
    {
        vec.PB( MP( it->Y, it->X ) );
        ++it;
    }
    SORT(vec);

    if ( vec[ 0 ].X == 1 && vec[ 1 ].X == 1 )
    {
        int min = numeric_limits< int >::max(), max = numeric_limits< int >::min();
        int minID, maxID;
        REP(i,N)
        {
            if ( v[ i ] < min )
            {
                min = v[ i ];
                minID = i;
            }
            if ( v[ i ] > max )
            {
                max = v[ i ];
                maxID = i;
            }
        }

        int flow = (v[ maxID ] - v[ minID ]) / 2;
        if ( SZ(vec) == 2 ||
              (v[ maxID ] - flow == vec[ 2 ].Y && v[ minID ] + flow == vec[ 2 ].Y) )
        {
            printf( "%d ml. from cup #%d to cup #%d.\n", flow, minID + 1, maxID + 1 );
            return 0;
        }
    }
    printf( "Unrecoverable configuration.\n" );

    return 0;
}


#include<cstdio>
using namespace std;
int c[1005];
int main() {
	int n, s = 0;
	scanf("%d",&n);
	if(n == 1) {
		printf("Exemplary pages.\n");
		return 0;
	}
	for(int i = 0; i<n; i++) {
		scanf("%d",&c[i]);
		s+=c[i];
	}
	int sum = s/n;
	if(s%n != 0) {
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	int cnt = 0, l, r;
	for(int i = 0; i<n; i++)
		if(c[i] == sum)
			cnt++;
		else if(c[i]<sum)
			l = i;
		else
			r = i;
	if(cnt == n) {
		printf("Exemplary pages.\n");
		return 0;
	}
	if(cnt != n-2) {
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	printf("%d ml. from cup #%d to cup #%d.\n", c[r]-sum, l+1, r+1);
	return 0;
}


n a.vol < b.vol;
}

int main()
{
	int n;
	Juice a[1005];
	int sum;
	while( scanf("%d",&n)!=EOF )
	{
		sum = 0;  //果汁总容量清零
		for( int i=1; i<=n; i++ ) //读入杯中的果汁容量及记录对应的序号
		{
			scanf("%d",&a[i].vol);
			a[i].order = i;
			sum +=  a[i].vol;
		}
		int average = sum / n;  //计算原来的果汁容量是多少
		sort(a+1,a+n+1,compare);  //注意排序的其实位置从a[1]开始
		int i=1;
		int subNum = 0;
		while( a[i].vol < average ) //计算少余平均数的杯子数目
		{
			subNum++;
			i++;
		}
		i=n;
		int addNum = 0;
		while( a[i].vol > average ) //计算多余平均数的杯子数目
		{
			addNum++;
			i--;
		}
		if( addNum==0 && subNum==0 ) //说明所有杯子都容量相等
 			printf("Exemplary pages.\n");
 		else if( addNum==1 && subNum==1 ) //说明只有一个杯子多了，一个杯子少了
			printf("%d ml. from cup #%d to cup #%d.\n",(a[n].vol-a[1].vol)/2, a[1].order, a[n].order);
		else  //说明至少有两杯牛奶多了或者少了，不可能倒一次相等，或者数据有只有一个多了或者少了的不正常情况
			printf("Unrecoverable configuration.\n");
	}
	return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;

struct Juice
{
	int vol;
	int order;
};
int compare( Juice a, Juice b)
{
	return a.vol < b.vol;
}

int main()
{
	int n;
	Juice a[1005];
	int sum;
	while( scanf("%d",&n)!=EOF )
	{
		sum = 0;  //果汁总容量清零
		for( int i=1; i<=n; i++ ) //读入杯中的果汁容量及记录对应的序号
		{
			scanf("%d",&a[i].vol);
			a[i].order = i;
			sum +=  a[i].vol;
		}
		int average = sum / n;  //计算原来的果汁容量是多少
		sort(a+1,a+n+1,compare);  //注意排序的其实位置从a[1]开始
		int i=1;
		int subNum = 0;
		while( a[i].vol < average && i<=n ) //计算少余平均数的杯子数目
		{
			subNum++;
			i++;
		}
		i=n;
		int addNum = 0;
		while( a[i].vol > average && i>=1 ) //计算多余平均数的杯子数目
		{
			addNum++;
			i--;
		}
		if( addNum==0 && subNum==0 ) //说明所有杯子都容量相等
 			printf("Exemplary pages.\n");
 		else if( addNum==1 && subNum==1 && average-a[1].vol==a[n].vol-average ) //说明只有一个杯子多了，一个杯子少了
			printf("%d ml. from cup #%d to cup #%d.\n",(a[n].vol-a[1].vol)/2, a[1].order, a[n].order);
		else  //说明至少有两杯牛奶多了或者少了，不可能倒一次相等，或者数据有只有一个多了或者少了的不正常情况
			printf("Unrecoverable configuration.\n");
	}
	return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;

struct Juice
{
	int vol;
	int order;
};
int compare( Juice a, Juice b)
{
	return a.vol < b.vol;
}

int main()
{
	int n;
	Juice a[1005];
	int sum;
	while( scanf("%d",&n)!=EOF )
	{
		sum = 0;  //果汁总容量清零
		for( int i=1; i<=n; i++ ) //读入杯中的果汁容量及记录对应的序号
		{
			scanf("%d",&a[i].vol);
			a[i].order = i;
			sum +=  a[i].vol;
		}
		int average = sum / n;  //计算原来的果汁容量是多少
		sort(a+1,a+n+1,compare);  //注意排序的其实位置从a[1]开始
		int i=1;
		int subNum = 0;
		while( a[i].vol < average ) //计算少余平均数的杯子数目
		{
			subNum++;
			i++;
		}
		i=n;
		int addNum = 0;
		while( a[i].vol > average ) //计算多余平均数的杯子数目
		{
			addNum++;
			i--;
		}
		if( addNum==0 && subNum==0 ) //说明所有杯子都容量相等
 			printf("Exemplary pages.\n");
 		else if( addNum==1 && subNum==1 ) //说明只有一个杯子多了，一个杯子少了
			printf("%d ml. from cup #%d to cup #%d.\n",(a[n].vol-a[1].vol)/2, a[1].order, a[n].order);
		else  //说明至少有两杯牛奶多了或者少了，不可能倒一次相等，或者数据有只有一个多了或者少了的不正常情况
			printf("Unrecoverable configuration.\n");
	}
	return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;

struct Juice
{
	int vol;
	int order;
};
int compare( Juice a, Juice b)
{
	return a.vol < b.vol;
}

int main()
{
	int n;
	Juice a[1005];
	int sum;
	while( scanf("%d",&n)!=EOF )
	{
		sum = 0;  //果汁总容量清零
		for( int i=1; i<=n; i++ ) //读入杯中的果汁容量及记录对应的序号
		{
			scanf("%d",&a[i].vol);
			a[i].order = i;
			sum +=  a[i].vol;
		}
		int average = sum / n;  //计算原来的果汁容量是多少
		sort(a+1,a+n+1,compare);  //注意排序的其实位置从a[1]开始
		if( a[1].vol == average ) //说明没有杯子的容量发生变化
		{
			printf("Exemplary pages.\n");
			continue;
		}
		if( a[2].vol<average ) //如果还有杯子中的果汁少于平均数，说明可能倒一次相等
		{
			printf("Unrecoverable configuration.\n");
			continue;
		}
		int i=n;
		int addNum = 0;
		while( a[i].vol > average ) //计算多余平均数的杯子数目
		{
			addNum++;
			i--;
		}
		if( addNum > 1 )  //说明至少有两杯牛奶多了，不可能倒一次相等
		{
			printf("Unrecoverable configuration.\n");
			continue;
		}
		printf("%d ml. from cup #%d to cup #%d.\n",(a[n].vol-a[1].vol)/2, a[1].order, a[n].order);
	}
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int>list(n);
    for (int i = 0; i < n; cin >> list[i++]);
    int mx = -1, cup = -1;
    for (int i = 0; i < n; i++)
    {
        int cnt = 0;
        for (int j = 0; j < n; j++)
            if (list[j] == list[i])
                cnt++;
        if (cnt > mx)
            cnt = mx, cup = list[i];
        else if (cnt == mx)
            if (list[i] != cup)
                cup = -1;
    }
    if (cup == -1)
    {
        cout << "Unrecoverable configuration." << endl;
        return 0;
    }
    vector<string>vs;
    for (int i = 0; i < n; i++)
    {
        if (list[i] != cup && list[i]!= (-1))
        {
            bool f = 0;
            for (int j = 0; j < n; j++)
            {
                if (list[i] + list[j] == 2 * cup)
                {
                    stringstream ss;
                    string s, tmp;
                    ss << max(list[i], list[j]) - cup;
                    ss >> tmp;
                    s += tmp;
                    s += " ml. from cup #";
                    ss.clear();
                    ss << (list[i] < list[j] ? i + 1 : j + 1);
                    ss >> tmp;
                    s += tmp;
                    ss.clear();
                    s += " to cup #";
                    ss << (list[i] > list[j] ? i + 1 : j + 1);
                    ss >> tmp;
                    s += tmp;
                    s += ".";
                    vs.push_back(s);
                    list[i] = list[j] = -1;
                    f = 1;
                }
            }
            if (!f)
            {
                cout << "Unrecoverable configuration." << endl;
                return 0;
            }
        }
    }
    for (int i = 0; i < vs.size(); i++)
        cout << vs[i] << endl;
    if (vs.size() == 0)
        cout << "Exemplary pages.";
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
using namespace std;

int main()
{
    int n, av = 0;
    cin >> n;
    vector<int>list(n);
    for (int i = 0; i < n; i++)
        cin >> list[i], av += list[i];
    if ((double)av / n > (int)av / n)
    {
        cout << "Unrecoverable configuration.";
        return 0;
    }
    av /= n;
    vector<string>vs;
        for (int i = 0; i < n; i++)
        {
            if (list[i] != av && list[i]!= (-1))
            {
                bool f = 0;
                for (int j = 0; j < n; j++)
                {
                    if (list[i] + list[j] == 2 * av)
                    {
                        stringstream ss;
                        string s, tmp;
                        ss << max(list[i], list[j]) - av;
                        ss >> tmp;
                        s += tmp;
                        s += " ml. from cup #";
                        ss.clear();
                        ss << (list[i] < list[j] ? i + 1 : j + 1);
                        ss >> tmp;
                        s += tmp;
                        ss.clear();
                        s += " to cup #";
                        ss << (list[i] > list[j] ? i + 1 : j + 1);
                        ss >> tmp;
                        s += tmp;
                        s += ".";
                        vs.push_back(s);
                        list[i] = list[j] = -1;
                        f = 1;
                    }
                }
                if (!f)
                {
                    cout << "Unrecoverable configuration." << endl;
                    return 0;
                }
            }
        }
        if (vs.size() > 1)
        {
            cout << "Unrecoverable configuration.";
            return 0;
        }
        for (int i = 0; i < vs.size(); i++)
                    cout << vs[i] << endl;
        if (vs.size() == 0)
                    cout << "Exemplary pages.";
        return 0;
    }


#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
using namespace std;

int main()
{
    int n, av = 0;
    cin >> n;
    vector<int>list(n);
    for (int i = 0; i < n; i++)
        cin >> list[i], av += list[i];
    if ((double)av / n > (int)av / n)
    {
        cout << "Unrecoverable configuration.";
        return 0;
    }
    av /= n;
    vector<string>vs;
        for (int i = 0; i < n; i++)
        {
            if (list[i] != av && list[i]!= (-1))
            {
                bool f = 0;
                for (int j = 0; j < n; j++)
                {
                    if (list[i] + list[j] == 2 * av)
                    {
                        stringstream ss;
                        string s, tmp;
                        ss << max(list[i], list[j]) - av;
                        ss >> tmp;
                        s += tmp;
                        s += " ml. from cup #";
                        ss.clear();
                        ss << (list[i] < list[j] ? i + 1 : j + 1);
                        ss >> tmp;
                        s += tmp;
                        ss.clear();
                        s += " to cup #";
                        ss << (list[i] > list[j] ? i + 1 : j + 1);
                        ss >> tmp;
                        s += tmp;
                        s += ".";
                        vs.push_back(s);
                        list[i] = list[j] = -1;
                        f = 1;
                    }
                }
                if (!f)
                {
                    cout << "Unrecoverable configuration." << endl;
                    return 0;
                }
            }
        }
        for (int i = 0; i < vs.size(); i++)
                    cout << vs[i] << endl;
        if (vs.size() == 0)
                    cout << "Exemplary pages.";
        return 0;
    }


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if ((V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    if (n == 1) {
        cout << "Exemplary pages.";
        goto exit;
    }

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if (n == 2 && (V[0].first + V[n-1].first) / 2.0 != (V[0].first + V[n-1].first) / 2) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    if (n > 2 && ((V[0].first + V[n-1].first) / 2.0 != V[1].first || (V[0].first + V[n-1].first) / 2.0 != V[n-2].first)) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if ((V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[n-1].second << " to cup #" << V[0].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    if (n == 1) {
        cout << "Exemplary pages.";
        goto exit;
    }

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if (n > 2 && (V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    if (n == 1) {
        cout << "Exemplary pages.";
        goto exit;
    }

    vector <pair <int, int>> V(n);

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if ((V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    if (n == 1) {
        cout << "Exemplary pages.";
        goto exit;
    }

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if ((V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


// I love natalia

#include <iostream>
#include <cstdio>

#include <algorithm>
#include <cmath>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define mp make_pair
#define pb push_back

#define DEBUG(x) cout << #x << ": " << (x) << endl;

int main() {
#ifndef ONLINE_JUDGE
    freopen( "input.txt", "rt", stdin );
    //freopen("output.txt", "wt", stdout);
#endif

    int n;
    cin >> n;

    vector <pair <int, int>> V(n);

    if (n == 1) {
        cout << "Exemplary pages.";
        goto exit;
    }

    for (int i = 0; i < n; i++) {
        cin >> V[i].first;
        V[i].second = i+1;
    }

    sort(V.begin(), V.end());

    if (V[0].first == V[1].first && V[1].first == V[n-1].first) {
        cout << "Exemplary pages.";
        goto exit;
    }

    if (n == 2 && (V[0].first + V[n-1].first) / 2.0 != (V[0].first + V[n-1].first) / 2) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    if (n > 2 && (V[0].first + V[n-1].first) / 2.0 != V[1].first) {
        cout << "Unrecoverable configuration.";
        goto exit;
    }

    cout << (V[0].first + V[n-1].first) / 2 - V[0].first << " ml. from cup #" << V[0].second << " to cup #" << V[n-1].second << ".";

exit:
    return ( 0 );
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#define ll long long
#define vi vector<int>
using namespace std;
ll a[100010];
ll b[100010];
int main()
{
	ll n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	sort(a, a + n);
	if (a[0] == a[n - 1])
	{
		cout << "Exemplary pages.";
	}
	else if (a[1] == a[n - 2])
	{
		ll t = 0,r=0;
		for (int i = 0; i < n; i++)
		{
			if (b[i] == a[0])
			{
				r = i + 1;
			}
			if (b[i] == a[n - 1])
			{
				t = i + 1;
			}
		}
		if ((a[n - 1] - a[0]) % 2 != 0)
		{
			cout << "Unrecoverable configuration.";;
		}
		else    cout << (a[n - 1] - a[0])/2 << " ml. from cup #" << r << " to cup #" << t << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#define ll long long
#define vi vector<int>
using namespace std;
ll a[100010];
ll b[100010];
int main()
{
	ll n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	sort(a, a + n);
	if (n == 2)
	{
		if (a[1] == a[0])
		{
			cout << "Exemplary pages.";
			return 0;
		}
		if ((a[1] - a[0]) % 2 == 0)
		{
			ll r, t;
			if (b[0]>b[1])
			{
				r = 2;
				t = 1;
			}
			else
			{
				r = 1;
				t = 2;
			}
			cout << (a[1] - a[0]) / 2 << " ml. from cup #" << r << " to cup #" << t << ".";
		}
		else
		{
			cout << "Unrecoverable configuration.";
		}
		//system("pause");
		return 0;
	}
	if (a[0] == a[n - 1])
	{
		cout << "Exemplary pages.";
	}
	else if (a[1] == a[n - 2])
	{
		ll t = 0,r=0;
		for (int i = 0; i < n; i++)
		{
			if (b[i] == a[0])
			{
				r = i + 1;
			}
			if (b[i] == a[n - 1])
			{
				t = i + 1;
			}
		}
		if ((a[n - 1] - a[0]) % 2 != 0)
		{
			cout << "Unrecoverable configuration.";;
		}
		else    cout << (a[n - 1] - a[0])/2 << " ml. from cup #" << r << " to cup #" << t << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#define ll long long
#define vi vector<int>
using namespace std;
ll a[100010];
ll b[100010];
int main()
{
	ll n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	sort(a, a + n);
	if (n == 2)
	{
		if (a[1] == a[0])
		{
			cout << "Exemplary pages.";
			return 0;
		}
		if ((a[1] - a[0]) % 2 == 0)
		{
			ll r, t;
			if (b[0]>b[1])
			{
				r = 2;
				t = 1;
			}
			else
			{
				r = 1;
				t = 2;
			}
			cout << (a[1] - a[0]) / 2 << " ml. from cup #" << r << " to cup #" << t << ".";
		}
		else
		{
			cout << "Unrecoverable configuration.";
		}
		//system("pause");
		return 0;
	}
	if (n == 3&&a[0]!=a[2]&&a[0]==(a[1]||a[1]==a[2]))
	{
		cout << "Unrecoverable configuration.";
		return 0;
	}
	if (a[0] == a[n - 1])
	{
		cout << "Exemplary pages.";
	}
	else if (a[1] == a[n - 2])
	{
		ll t = 0,r=0;
		for (int i = 0; i < n; i++)
		{
			if (b[i] == a[0])
			{
				r = i + 1;
			}
			if (b[i] == a[n - 1])
			{
				t = i + 1;
			}
		}
		if ((a[n - 1] - a[0]) % 2 != 0 || a[n - 1] - ((a[n - 1] - a[0]) / 2) != a[1] || a[0] + ((a[n - 1] - a[0]) / 2) != a[1])
		{
			cout << "Unrecoverable configuration.";;
		}
		else    cout << (a[n - 1] - a[0])/2 << " ml. from cup #" << r << " to cup #" << t << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#define ll long long
#define vi vector<int>
using namespace std;
ll a[100010];
ll b[100010];
int main()
{
	ll n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	sort(a, a + n);
	if (n == 2)
	{
		if (a[1] == a[0])
		{
			cout << "Exemplary pages.";
			return 0;
		}
		if ((a[1] - a[0]) % 2 == 0)
		{
			ll r, t;
			if (a[0]>a[1])
			{
				r = 2;
				t = 1;
			}
			else
			{
				r = 1;
				t = 2;
			}
			cout << (a[1] - a[0]) / 2 << " ml. from cup #" << r << " to cup #" << t << ".";
		}
		else
		{
			cout << "Unrecoverable configuration.";
		}
		return 0;
	}
	if (a[0] == a[n - 1])
	{
		cout << "Exemplary pages.";
	}
	else if (a[1] == a[n - 2])
	{
		ll t = 0,r=0;
		for (int i = 0; i < n; i++)
		{
			if (b[i] == a[0])
			{
				r = i + 1;
			}
			if (b[i] == a[n - 1])
			{
				t = i + 1;
			}
		}
		if ((a[n - 1] - a[0]) % 2 != 0)
		{
			cout << "Unrecoverable configuration.";;
		}
		else    cout << (a[n - 1] - a[0])/2 << " ml. from cup #" << r << " to cup #" << t << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	//system("pause");
	return 0;
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#define ll long long
#define vi vector<int>
using namespace std;
ll a[100010];
ll b[100010];
int main()
{
	ll n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	sort(a, a + n);
	if (a[0] == a[n - 1])
	{
		cout << "Exemplary pages.";
	}
	else if (a[1] == a[n - 2])
	{
		ll t = 0,r=0;
		for (int i = 0; i < n; i++)
		{
			if (b[i] == a[0])
			{
				r = i + 1;
			}
			if (b[i] == a[n - 1])
			{
				t = i + 1;
			}
		}
		if ((a[n - 1] - a[0]) % 2 != 0)
		{
			cout << "Unrecoverable configuration.";;
		}
		else    cout << (a[n - 1] - a[0])/2 << " ml. from cup #" << t << " to cup #" << r << ".";
	}
	else
	{
		cout << "Unrecoverable configuration.";
	}
	//system("pause");
	return 0;
}


#include<iostream>
using namespace std;
int a[1005];
int main()
{
	int i,j,n,m,b,flag=0,c,d;
	float s;
	cin>>n;
	for(s=0,i=1;i<=n;i++)
	{
		cin>>a[i];
		s+=a[i];
	}
	m=s/n;
	if(m!=s/n)cout<<"Unrecoverable configuration."<<endl;
	else
	{
		for(i=1;i<=n;i++)
		{
			if(m!=a[i])
			{
				c=i;
				b=a[i]-m;
				for(j=i;j<=n;j++)
					if(a[j]+b==m){flag++;d=j;a[i]=m;a[j]=m;break;}
			}
		}
    	if(flag==0)cout<<"Exemplary pages."<<endl;
    	else if(flag>1)cout<<"Unrecoverable configuration."<<endl;
    	else printf("%d ml. from cup #%d to cup #%d.\n",b,c,d);
	}
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
int a[1005];
int main()
{
	int i,j,n,m,b,flag=0,c,d,k;
	float s;
	cin>>n;
	for(s=0,i=1;i<=n;i++)
	{
		cin>>a[i];
		s+=a[i];
	}
	m=s/n;
	if(m!=s/n)cout<<"Unrecoverable configuration."<<endl;
	else
	{
		for(k=0,i=1;i<=n;i++)
		{
			if(m!=a[i])
			{
				c=i;b=a[i]-m;flag++;
				for(j=i+1;j<=n;j++)
					if(a[j]+b==m)
					{
						d=j;a[i]=m;a[j]=m;k=1;
					    if(b>0)printf("%d ml. from cup #%d to cup #%d.\n",b,d,c);
						else printf("%d ml. from cup #%d to cup #%d.\n",(-1)*b,c,d);
					    break;
					}
			}
		}
    	if(flag==0)cout<<"Exemplary pages."<<endl;
		else if(k==0)cout<<"Unrecoverable configuration."<<endl;
	}
	return 0;
}