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


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


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


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


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


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


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


#include <iostream>
#include <cmath>
#include <string>

using namespace std;

int a[1005];
int sum = 0;
int t1, t2;

int main()
{
    int  n;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        sum += a[i];
    }
    if (sum % n != 0)
    {
        cout << "Unrecoverable configuration." << endl;
        return 0;
    }
    int avr = sum / n;
    int tgh = 0;
    t1 = t2 = -1;
    for(int i = 0; i < n; i++)
       if (a[i] != avr)
       {
          tgh++;
          if (t1 == -1)
             t1 = i;
          else
             t2 = i;
       }
    if (tgh == 0)
        cout<< "Exemplary pages." <<endl;
    else if (tgh != 2 || a[t1] + a[t2] != 2*avr)
        cout << "Unrecoverable configuration." << endl;
    else
    {
        if (a[t2] < a[t1])
            swap(t1, t2);
        cout << abs (a[t1] - a[t2]) / 2 <<" ml. from cup #"<<t1+1<<" to cup #"<<t2+1<<"."<<endl;
    }
   return 0;
}


#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
int A[1001];
int main()
{
    int n,a; cin>>n;
    map<int,int>m;
    vector<pair<int,int> >v;
    for(int i=0; i<n; ++i)
    {
        cin>>a;
        if(!m[a])v.push_back(make_pair(a,i));
        m[a]++;
    }
    sort(v.begin(),v.end());
    if(1==(int)m.size())cout<<"Exemplary pages.";
    else if(2==n&&v.size()==2&&(v[1].first-v[0].first)%2==0)cout<<(v[1].first-v[0].first)/2<<" ml. from cup #"<<v[0].second+1<<" to cup #"<<v[1].second+1<<'.';
    else if(3!=(int)m.size())cout<<"Unrecoverable configuration.";
    else
    {
        if(v[2].first-v[1].first==v[1].first-v[0].first)cout<<v[2].first-v[1].first<<" ml. from cup #"<<v[0].second+1<<" to cup #"<<v[2].second+1<<'.';
        else cout<<"Unrecoverable configuration.";
    }

    return 0;
}


#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
int A[1001];
int main()
{
	int n,a; cin>>n;
	map<int,int>m;
	vector<pair<int,int> >v;
	for(int i=0; i<n; ++i)
	{
		cin>>a;
		if(!m[a])v.push_back(make_pair(a,i));
		m[a]++;
	}
	sort(v.begin(),v.end());
	if(1==(int)m.size())cout<<"Exemplary pages.";
	else if(2==n&&v.size()==2&&(v[1].first-v[0].first)%2==0)cout<<(v[1].first-v[0].first)/2<<" ml. from cup #"<<v[0].second+1<<" to cup #"<<v[1].second+1<<'.';
	else if(3!=(int)m.size())cout<<"Unrecoverable configuration.";
	else
	{
		if(v[2].first-v[1].first==v[1].first-v[0].first&&m[v[2].first]==1&&m[v[0].first]==1)cout<<v[2].first-v[1].first<<" ml. from cup #"<<v[0].second+1<<" to cup #"<<v[2].second+1<<'.';
		else cout<<"Unrecoverable configuration.";
	}

    return 0;
}


#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<cstring>
#include<algorithm>
#include<set>
using namespace std;
int A[1001];
int main()
{
    int n,a; cin>>n;
    map<int,int>m;
    vector<pair<int,int> >v;
    for(int i=0; i<n; ++i)
    {
        cin>>a;
        if(!m[a])v.push_back(make_pair(a,i));
        m[a]++;
    }
    if(1==(int)m.size())cout<<"Exemplary pages.";
    else if(3!=(int)m.size())cout<<"Unrecoverable configuration.";
    else
    {
        sort(v.begin(),v.end());
        if(v[2].first-v[1].first==v[1].first-v[0].first)cout<<v[2].first-v[1].first<<" ml. from cup #"<<v[0].second+1<<" to cup #"<<v[2].second+1<<'.';
        else cout<<"Unrecoverable configuration.";
    }

    return 0;
}


#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <queue>
#include <vector>
#include <time.h>

using namespace std;

int main()
{
	int n;
	int a[1005];

	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}

	if(n==1)
	{
		cout<<"Exemplary pages.";
		return 0;
	}
	if(n==2)
	{
		if(a[1]==a[2])
		{
			cout<<"Exemplary pages.";
			return 0;
		}
		if((a[2]-a[1])%2!=0)
		{
			cout<<"Unrecoverable configuration.";
			return 0;
		}
		int t=a[2]+a[1];
		t=t/2;
		if(a[2]>a[1])
		{
			cout<<a[2]-t<<" ml. from cup #1 to cup #2.";
		}
		else
		{
			cout<<a[1]-t<<" ml. from cup #2 to cup #1.";
		}
		return 0;
	}

	bool good=true;
	for(int i=1;i<=n;i++)
	{
		if(a[i]!=a[1])
			good=false;
	}
	if(good)
	{
		cout<<"Exemplary pages.";
		return 0;
	}

	int sum=0;
	for(int i=1;i<=n;i++)
	{
		sum+=a[i];
	}

	if(sum%n!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int ave=sum/n;
	int less,iless,more,imore;
	iless=-1;
	imore=-1;

	for(int i=1;i<=n;i++)
	{
		if(a[i]<ave)
		{
			if(iless!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			less=a[i];
			iless=i;
		}
		if(a[i]>ave)
		{
			if(imore!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			more=a[i];
			imore=i;
		}
	}

	if((less+more)%2!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int tt;
	tt=ave-less;

	if((tt+less)!=ave || (more-tt)!=ave)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	cout<<tt<<" ml. from cup #"<<iless<<" to cup #"<<imore<<".";
    return 0;
}


#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <queue>
#include <vector>
#include <time.h>

using namespace std;

int main()
{
	int n;
	int a[1005];

	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}

	if(n==1)
	{
		cout<<"Exemplary pages.";
		return 0;
	}
	if(n==2)
	{
		if(a[1]==a[2])
		{
			cout<<"Exemplary pages.";
			return 0;
		}
		if((a[2]-a[1])%2==1)
		{
			cout<<"Unrecoverable configuration.";
			return 0;
		}
		int t=a[2]+a[1];
		t=t/2;
		if(a[2]>a[1])
		{
			cout<<t<<" ml. from cup #1 to cup #2.";
		}
		else
		{
			cout<<t<<" ml. from cup #2 to cup #1.";
		}
		return 0;
	}

	bool good=true;
	for(int i=1;i<=n;i++)
	{
		if(a[i]!=a[1])
			good=false;
	}
	if(good)
	{
		cout<<"Exemplary pages.";
		return 0;
	}

	int sum=0;
	for(int i=1;i<=n;i++)
	{
		sum+=a[i];
	}

	if(sum%n!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int ave=sum/n;
	int less,iless,more,imore;
	iless=-1;
	imore=-1;

	for(int i=1;i<=n;i++)
	{
		if(a[i]<ave)
		{
			if(iless!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			less=a[i];
			iless=i;
		}
		if(a[i]>ave)
		{
			if(imore!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			more=a[i];
			imore=i;
		}
	}

	if((less+more)%2!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int tt;
	tt=ave-less;

	if((tt+less)!=ave || (more-tt)!=ave)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	cout<<tt<<" ml. from cup #"<<iless<<" to cup #"<<imore<<".";
    return 0;
}


#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <queue>
#include <vector>
#include <time.h>

using namespace std;

int main()
{
	int n;
	int a[1005];

	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}

	if(n==1)
	{
		cout<<"Exemplary pages.";
		return 0;
	}
	if(n==2)
	{
		if(a[1]==a[2])
		{
			cout<<"Exemplary pages.";
			return 0;
		}
		if((a[2]-a[1])%2==1)
		{
			cout<<"Unrecoverable configuration.";
			return 0;
		}
		int t=a[2]+a[1];
		t=t/2;
		if(a[2]>a[1])
		{
			cout<<a[2]-t<<" ml. from cup #1 to cup #2.";
		}
		else
		{
			cout<<a[1]-t<<" ml. from cup #2 to cup #1.";
		}
		return 0;
	}

	bool good=true;
	for(int i=1;i<=n;i++)
	{
		if(a[i]!=a[1])
			good=false;
	}
	if(good)
	{
		cout<<"Exemplary pages.";
		return 0;
	}

	int sum=0;
	for(int i=1;i<=n;i++)
	{
		sum+=a[i];
	}

	if(sum%n!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int ave=sum/n;
	int less,iless,more,imore;
	iless=-1;
	imore=-1;

	for(int i=1;i<=n;i++)
	{
		if(a[i]<ave)
		{
			if(iless!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			less=a[i];
			iless=i;
		}
		if(a[i]>ave)
		{
			if(imore!=-1)
			{
				cout<<"Unrecoverable configuration.";
				return 0;
			}
			more=a[i];
			imore=i;
		}
	}

	if((less+more)%2!=0)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	int tt;
	tt=ave-less;

	if((tt+less)!=ave || (more-tt)!=ave)
	{
		cout<<"Unrecoverable configuration.";
		return 0;
	}

	cout<<tt<<" ml. from cup #"<<iless<<" to cup #"<<imore<<".";
    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    cout << -vol << "ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    int t = 0, b=n-1;

    while(t!=b)
    {
        int need = best - mas[b].first, have = mas[t].first - best;
        if(need==0 && have == 0)
        {
            --b;
            ++t;
        }
        if(have > need)
        {
            if(need!=0)
            Transfer(need, t, b--);
        }
        else
        {
            if(have!=0)
            Transfer(have, t++, b);
        }
    }

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    cout << -vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    int t = 0, b=n-1;

    while(t<b)
    {
        int need = best - mas[b].first, have = mas[t].first - best;
        if(need==0 && have == 0)
        {
            --b;
            ++t;
        }
        if(have > need)
        {
            if(need!=0)
            Transfer(need, t, b--);
        }
        else
        {
            if(have!=0)
            Transfer(have, t++, b);
        }
    }

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    cout << -vol << "ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    int t = 0, b=n-1;

    while(t<b)
    {
        int need = best - mas[b].first, have = mas[t].first - best;
        if(need==0 && have == 0)
        {
            --b;
            ++t;
        }
        if(have > need)
        {
            if(need!=0)
            Transfer(need, t, b--);
        }
        else
        {
            if(have!=0)
            Transfer(have, t++, b);
        }
    }

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

string out;

void Transfer(int vol, int t, int b)
{
    mas[t].first += vol;
    mas[b].first -= vol;
    stringstream sin;
    sin << vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;

    getline(sin, out);
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    for(int i=0; i<n; ++i)
    {
        for(int j=0; j<n; ++j)
        {
            if(mas[i].first - best == best - mas[j].first)
            {
                Transfer(best - mas[j].first, j, i);
            }
        }
    }

    good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(!good)
        Imposs();
    else
        cout << out << endl;

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

string out;

void Transfer(int vol, int t, int b)
{
    mas[t].first += vol;
    mas[b].first -= vol;
    stringstream sin;
    if(vol < 0)
    {
        vol = -vol;
        swap(t,b);
    }
    sin << vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;
    getline(sin, out);
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    for(int i=0; i<n; ++i)
    {
        for(int j=0; j<n; ++j)
        {
            if(mas[i].first - best == best - mas[j].first && best - mas[j].first != 0)
            {
                Transfer(best - mas[j].first, j, i);
                goto out;
            }
        }
    }
    out:;
    good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(!good)
        Imposs();
    else
        cout << out << endl;

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    cout << -vol << "ml. from cup #" <<mas[b].second+1 << " to cup #" << mas[t].second+1 << "." <<endl;
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    int t = 0, b=n-1;

    while(t!=b)
    {
        int need = best - mas[b].first, have = mas[t].first - best;

        if(have > need)
        {
            if(need!=0)
            Transfer(need, t, b--);
        }
        else
        {
            if(have!=0)
            Transfer(have, t++, b);
        }
    }

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

string out;

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    stringstream sin;
    sin << vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;

    getline(sin, out);
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    for(int i=0; i<n; ++i)
    {
        for(int j=0; j<n; ++j)
        {
            if(mas[i].first - best == best - mas[j].first)
            {
                Transfer(best - mas[j].first, j, i);
            }
        }
    }

    good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(!good)
        Imposs();
    else
        cout << out << endl;

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

string out;

void Transfer(int vol, int t, int b)
{
    mas[t].first -= vol;
    mas[b].first += vol;
    stringstream sin;
    sin << vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;

    getline(sin, out);
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    for(int i=0; i<n; ++i)
    {
        for(int j=0; j<n; ++j)
        {
            if(mas[i].first - best == best - mas[j].first)
            {
                Transfer(best - mas[j].first, j, i);
            }
        }
    }

    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(!good)
        Imposs();
    else
        cout << out << endl;

    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <limits>
#include <bitset>
#include <list>
#include <iterator>
#include <functional>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()

#pragma comment(linker, "/STACK:64000000")

const double PI = 3.1415926535897932384626433832795;
const LL ONE = 1LL;
const double EPS = 1e-8;

LL gcd(LL a, LL b)
{
    return (b)? gcd(b, a%b):a;
}

LL max(LL a, LL b)
{
    return (a>b)?a:b;
}

LL min(LL a, LL b)
{
    return (a<b)?a:b;
}

struct Point
{
    ULL x,y;
    Point(ULL _x = 0, ULL _y = 0):
    x(_x),
    y(_y)
    {}
    void Read()
    {
        cin >> x >> y ;
    }

    double Dist(Point a)
    {
        return sqrt((double)((a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)));
    }
};

bool operator <(const pair<int, int> &a, const pair<int, int> &b)
{
    return a.first < b.first;
}

int n;
vector< pair<int, int> > mas;

int best = 0;

void Imposs()
{
    cout << "Unrecoverable configuration." << endl;
    exit(0);
}

void Good()
{
    cout << "Exemplary pages." << endl;
    exit(0);
}

string out;

void Transfer(int vol, int t, int b)
{
    mas[t].first += vol;
    mas[b].first -= vol;
    stringstream sin;
    if(vol < 0)
    {
        vol = -vol;
        swap(t,b);
    }
    sin << vol << " ml. from cup #" <<mas[t].second+1 << " to cup #" << mas[b].second+1 << "." <<endl;
    getline(sin, out);
}

int main()
{
    cin >> n;
    mas.resize(n);

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

    if(best%n!=0)
        Imposs();

    best/=n;
    bool good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(good)
        Good();

    sort(all(mas));

    for(int i=0; i<n; ++i)
    {
        for(int j=0; j<n; ++j)
        {
            if(mas[i].first - best == best - mas[j].first && best - mas[j].first != 0)
            {
                Transfer(best - mas[j].first, j, i);
                break;
            }
        }
    }

    good = true;
    for(int i=0; i<n; ++i)
    {
        if(mas[i].first!=best)
        {
            good = false;
        }
    }
    if(!good)
        Imposs();
    else
        cout << out << endl;

    return 0;
}


#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 10000

int f[maxn];
int vis[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&f[i]),vis[f[i]]=0;;
	cnt=0;
	for(i=0;i<n;i++)
	{
		if(!vis[f[i]])
		{
			cnt++;
		}
		vis[f[i]]++;
	}
	if(cnt==1)
	{
		printf("Exemplary pages.\n");
		return 0;
	}
	if(cnt>3)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	if(n>2&& cnt==2)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	int maxx=0,minx=100000;
	int idmax=0,idmin=0;
	for(i=0;i<n;i++)
	{
		if(f[i]>maxx)
		{
			maxx=f[i];idmax=i;
		}
		if(f[i]<minx)
		{
			minx=f[i];
			idmin=i;
		}
	}

	printf("%d ml. from cup #%d to cup #%d.",f[idmax]-f[idmin],idmin+1,idmax+1);
	return 0;
}

/*
//a
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 100000

int f[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	double t;
	gets(str);
	bool flag=false;

	len=strlen(str);
	int start=0,end=len-1;
	for(i=0;i<len;i++)
		if(str[i]!='0')break;
		else start++;
	if(start>0)start--;
	for(i=start;i<len;i++)
	{
		if(str[i]=='.'){flag=true;break;}
		end=i;
	}
	if(str[end]=='9')
	{
		printf("GOTO Vasilisa.\n");return 0;
	}
//	if(start==end)start--;
//printf("%d %d\n",start,end);
	if(flag&& str[end+2]>='5')str[end]++;
	for(i=start;i<=end;i++)printf("%c",str[i]);
	printf("\n");
	return 0;
}

*/


#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 10000

int f[maxn];
int vis[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	scanf("%d",&n);
	int sum=0;
	for(i=0;i<n;i++)
		scanf("%d",&f[i]),vis[f[i]]=0,sum+=f[i];
	if(sum%n!=0)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	cnt=0;
	for(i=0;i<n;i++)
	{
		if(!vis[f[i]])
		{
			cnt++;
		}
		vis[f[i]]++;
	}
	if(cnt==1)
	{
		printf("Exemplary pages.\n");
		return 0;
	}
	if(cnt>3)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	if(n>2&& cnt==2)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	int maxx=0,minx=100000;
	int idmax=0,idmin=0;
	for(i=0;i<n;i++)
	{
		if(f[i]>maxx)
		{
			maxx=f[i];idmax=i;
		}
		if(f[i]<minx)
		{
			minx=f[i];
			idmin=i;
		}
	}
	ans=f[idmax]-f[idmin];
	if(ans&1)printf("Unrecoverable configuration.\n");
	else
	printf("%d ml. from cup #%d to cup #%d.\n",(ans)/2,idmin+1,idmax+1);
	return 0;
}

/*
//a
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 100000

int f[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	double t;
	gets(str);
	bool flag=false;

	len=strlen(str);
	int start=0,end=len-1;
	for(i=0;i<len;i++)
		if(str[i]!='0')break;
		else start++;
	if(start>0)start--;
	for(i=start;i<len;i++)
	{
		if(str[i]=='.'){flag=true;break;}
		end=i;
	}
	if(str[end]=='9')
	{
		printf("GOTO Vasilisa.\n");return 0;
	}
//	if(start==end)start--;
//printf("%d %d\n",start,end);
	if(flag&& str[end+2]>='5')str[end]++;
	for(i=start;i<=end;i++)printf("%c",str[i]);
	printf("\n");
	return 0;
}

*/


#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 10000

int f[maxn];
int vis[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&f[i]),vis[f[i]]=0;;
	cnt=0;
	for(i=0;i<n;i++)
	{
		if(!vis[f[i]])
		{
			cnt++;
		}
		vis[f[i]]++;
	}
	if(cnt==1)
	{
		printf("Exemplary pages.\n");
		return 0;
	}
	if(cnt>3)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	if(n>2&& cnt==2)
	{
		printf("Unrecoverable configuration.\n");
		return 0;
	}
	int maxx=0,minx=100000;
	int idmax=0,idmin=0;
	for(i=0;i<n;i++)
	{
		if(f[i]>maxx)
		{
			maxx=f[i];idmax=i;
		}
		if(f[i]<minx)
		{
			minx=f[i];
			idmin=i;
		}
	}
	ans=f[idmax]-f[idmin];
	if(ans&1)printf("Unrecoverable configuration.\n");
	else
	printf("%d ml. from cup #%d to cup #%d.",(ans)/2,idmin+1,idmax+1);
	return 0;
}

/*
//a
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>

using namespace std;

#define int64 long long

#define maxn 100000

int f[maxn];
char str[maxn];
int len;
int cnt;
int ans=0;
int a,b,c;
struct Node
{
	int s,e;
}node[maxn];

bool cmp(const Node &a,const Node &b)
{
	return true;
}

int main()
{
	int n,m,i,j;
	double t;
	gets(str);
	bool flag=false;

	len=strlen(str);
	int start=0,end=len-1;
	for(i=0;i<len;i++)
		if(str[i]!='0')break;
		else start++;
	if(start>0)start--;
	for(i=start;i<len;i++)
	{
		if(str[i]=='.'){flag=true;break;}
		end=i;
	}
	if(str[end]=='9')
	{
		printf("GOTO Vasilisa.\n");return 0;
	}
//	if(start==end)start--;
//printf("%d %d\n",start,end);
	if(flag&& str[end+2]>='5')str[end]++;
	for(i=start;i<=end;i++)printf("%c",str[i]);
	printf("\n");
	return 0;
}

*/


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0){cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<min(mas[0],mas[1])<<" to cup #"<<max(mas[0],mas[1])<<'.'; return 0;}

	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=0;}
	}
	}

for(int i=0;i<n;i++){mas2[i]=mas[i];}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=0){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[n-1]){f0=i+1;}
		if(mas2[i]==mas[n-3]){f2=i+1;}
	}
	}
	cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
	cin>>n;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1,r1,r2;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0)
	{
		if(mas[0]<mas[1]){r1=1;r2=2;}
		if(mas[0]>mas[1]){r1=2;r2=1;}
		cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<r1<<" to cup #"<<r2<<'.'; return 0;

	}
	for(int i=0;i<n;i++){mas2[i]=mas[i];}
	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=-1;}
	}
	}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=-1){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
	int t=0;
	//for(int i=0;i<n;i++){cout<<mas2[i]<<endl;}
	for(int i=0;i<n;i++){if(mas[n-1]==mas2[i]||mas[n-3]==mas2[i]){t++;}}
	if(t>2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[n-1]){f0=i+1;}
		if(mas2[i]==mas[n-3]){f2=i+1;}
	}
	}
	cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
	cin>>n;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1,r1,r2;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0)
	{
		if(mas[0]<mas[1]){r1=1;r2=2;}
		if(mas[0]>mas[1]){r1=2;r2=1;}
		cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<r1<<" to cup #"<<r2<<'.'; return 0;

	}
	for(int i=0;i<n;i++){mas2[i]=mas[i];}
	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=-1;}
	}
	}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=-1){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
	int t=0;
	//for(int i=0;i<n;i++){cout<<mas2[i]<<endl;}
	for(int i=0;i<n;i++){if(mas[n-1]==mas2[i]||mas[n-3]==mas2[i]){t++;}}
	if(t>2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2&&(mas[n-1]+mas[n-3])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[n-1]){f0=i+1;}
		if(mas2[i]==mas[n-3]){f2=i+1;}
	}
	}
	cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
	cin>>n;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0){cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<min(mas[0],mas[1])<<" to cup #"<<max(mas[0],mas[1])<<'.'; return 0;}

	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++){mas2[i]=mas[i];}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=0;}
	}
	}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=0){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[1]!=(mas[0]+mas[2])/2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[1]==(mas[0]+mas[2])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[0]){f0=i+1;}
		if(mas2[i]==mas[2]){f2=i+1;}
	}
	}
	cout<<(mas[2]-mas[0])/2<<" ml. from cup #"<<f0<<" to cup #"<<f2<<'.';
	cin>>n;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
    int n,k=0,p=0;
    int f0=-1,f2=-1;
    cin>>n;
    for(int i=0;i<n;i++){cin>>mas[i];}

    if(n==1){cout<<"Exemplary pages."; return 0;}
    if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
    if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
    if(n==2&&(mas[0]-mas[1])%2==0){cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<min(mas[0],mas[1])<<" to cup #"<<max(mas[0],mas[1])<<'.'; return 0;}

    for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
    if(k==n){cout<<"Exemplary pages."; return 0;}

    for(int i=0;i<n;i++)
    {
    for(int j=0;j<n;j++)
    {
        if(i>j&&mas[i]==mas[j]){mas[j]=0;}
    }
    }

for(int i=0;i<n;i++){mas2[i]=mas[i];}

    for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

    for(int i=0;i<n;i++){if(mas[i]!=0){p++;}}
    if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
    sort(mas,mas+n);
    if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
    if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
    {
    for(int i=0;i<n;i++)
    {
        if(mas2[i]==mas[n-1]){f0=i+1;}
        if(mas2[i]==mas[n-3]){f2=i+1;}
    }
    }
    cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
    cin>>n;
    return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1,r1,r2;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0)
	{
		if(mas[0]<mas[1]){r1=1;r2=2;}
		if(mas[0]>mas[1]){r1=2;r2=1;}
		cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<r1<<" to cup #"<<r2<<'.'; return 0;

	}

	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=-1;}
	}
	}

for(int i=0;i<n;i++){mas2[i]=mas[i];}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=-1){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[n-1]){f0=i+1;}
		if(mas2[i]==mas[n-3]){f2=i+1;}
	}
	}
	cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
	cin>>n;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int mas[1100],mas2[1100];
int main()
{
	int n,k=0,p=0;
	int f0=-1,f2=-1,r1,r2;
	cin>>n;
	for(int i=0;i<n;i++){cin>>mas[i];}

	if(n==1){cout<<"Exemplary pages."; return 0;}
	if(n==2&&mas[0]==mas[1]){cout<<"Exemplary pages."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2!=0){cout<<"Unrecoverable configuration."; return 0;}
	if(n==2&&(mas[0]-mas[1])%2==0)
	{
		if(mas[0]<mas[1]){r1=1;r2=2;}
		if(mas[0]>mas[1]){r1=2;r2=1;}
		cout<<abs((mas[1]-mas[0])/2)<<" ml. from cup #"<<r1<<" to cup #"<<r2<<'.'; return 0;

	}

	for(int i=0;i<n;i++){if(mas[0]==mas[i]){k++;}}
	if(k==n){cout<<"Exemplary pages."; return 0;}

	for(int i=0;i<n;i++)
	{
	for(int j=0;j<n;j++)
	{
		if(i>j&&mas[i]==mas[j]){mas[j]=0;}
	}
	}

for(int i=0;i<n;i++){mas2[i]=mas[i];}

	//for(int i=0;i<n;i++){cout<<mas[i]<<endl;}

	for(int i=0;i<n;i++){if(mas[i]!=0){p++;}}
	if(p!=3){cout<<"Unrecoverable configuration."; return 0;}
	sort(mas,mas+n);
	if(mas[n-2]!=(mas[n-1]+mas[n-3])/2){cout<<"Unrecoverable configuration."; return 0;}
	if(mas[n-2]==(mas[n-1]+mas[n-3])/2)
	{
	for(int i=0;i<n;i++)
	{
		if(mas2[i]==mas[n-1]){f0=i+1;}
		if(mas2[i]==mas[n-3]){f2=i+1;}
	}
	}
	cout<<abs((mas[n-3]-mas[n-1])/2)<<" ml. from cup #"<<f2<<" to cup #"<<f0<<'.';
	cin>>n;
	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 ++)

bool is_equal(vector < int > v , int avg){

    FOR(i , 0 , SZ(v))
        if(v[i] != avg)
            return false ;

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

    int n , vol , avg = 0 ;
    vector < int > v ;
    vector < pair < int , pair < int , int > > > ans ;// vol , i , j
    cin >> n ;
    while(cin >> vol){
        avg += vol ;
        v.push_back(vol) ;
    }

    bool bad = false ;
    bool good = false ;

    //===============================================================
    double temp1 = double(avg) / double(n) ;
    double temp2 = int(avg) / int(n) ;
    if(temp1 != temp2) bad  = true ;
    //===============================================================
    avg /= n ;
    if(is_equal(v , avg) == true) good = true ;
    //===============================================================
    else if(is_equal(v , avg) == false){
        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){
                        ans.push_back(make_pair(rem , make_pair(j+1 , i+1))) ;
                        //cout << rem << " ml. from cup #" << j+1 << " to cup #" << i+1 << "." << endl ;
                        v[j] = avg ;
                        v[i] = avg ;
                        goto SKIP ;
                    }
                }// end of for(j)
            }
        }// end of for(i)
    }
SKIP :
    if(is_equal(v , avg) == false) bad = true ;
    //===============================================================

    if(bad) cout << "Unrecoverable configuration." << endl ;
    else if(!bad && good) cout << "Exemplary pages." << endl ;
    else{
        FOR(i , 0 , SZ(ans))
            cout << ans[i].first << " ml. from cup #" << ans[i].second.first << " to cup #" << ans[i].second.second << "." << endl ;
    }
    //===============================================================

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.
---------------------------------------------
*/


            /* 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 ++)

bool is_equal(vector < int > v , int avg){

    FOR(i , 0 , SZ(v))
        if(v[i] != avg)
            return false ;

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

    int n , vol , avg = 0 ;
    vector < int > v ;
    vector < pair < int , pair < int , int > > > ans ;// vol , i , j
    cin >> n ;
    while(cin >> vol){
        avg += vol ;
        v.push_back(vol) ;
    }

    bool bad = false ;
    bool good = false ;

    //===============================================================
    double temp1 = double(avg) / double(n) ;
    double temp2 = int(avg) / int(n) ;
    if(temp1 != temp2) bad  = true ;
    //===============================================================
    avg /= n ;
    if(is_equal(v , avg) == true) good = true ;
    //===============================================================
    else if(is_equal(v , avg) == false){
        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){
                        ans.push_back(make_pair(rem , make_pair(j+1 , i+1))) ;
                        //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)
    }
    if(is_equal(v , avg) == false) bad = true ;
    //===============================================================

    if(bad) cout << "Unrecoverable configuration." << endl ;
    else if(!bad && good) cout << "Exemplary pages." << endl ;
    else{
        FOR(i , 0 , SZ(ans))
            cout << ans[i].first << " ml. from cup #" << ans[i].second.first << " to cup #" << ans[i].second.second << "." << endl ;
    }
    //===============================================================

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.
---------------------------------------------
*/


            /* 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") ;

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

    double temp = double(avg) / double(n) ;
    if(temp != int(avg) / int(n)) cout << "Unrecoverable configuration." << endl ;

    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 ;
    else{
        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.
---------------------------------------------
*/


            /* 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>
#include <algorithm>
#include <vector>
#include <math.h>
#include <queue>
#include <stack>
#include<string>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

const ll mymod = 1e9 + 7;
string s;
int dp[100001];

int main() {
	cin.tie(0); cout.tie(0);
	ios_base::sync_with_stdio(false);

	dp[1] = 1;
	dp[2] = 2;
	for (int i = 3; i <= 100000; i++)
		dp[i] = (dp[i - 1] + dp[i - 2]) % mymod;

	cin >> s;
	ll ans = 0;
	int len = s.length();
	bool impo = false;;
	for (int i = 0; i < len - 1;i++) {
		if (s[i] == 'm' || s[i] == 'w')
			impo = true;
		if (s[i] == 'u'&&s[i+1]=='u') {
			int cnt = 2;
			i += 2;
			while (s[i] == 'u') {
				cnt++;
				i++;
				if (i == len)
					break;
			}
			ans = (ans+dp[cnt])%mymod;
		}
		else if (s[i] == 'n'&&s[i+1]=='n') {
			int cnt = 2;
			i += 2;
			while (s[i] == 'n') {
				cnt++;
				i++;
				if (i == len)
					break;
			}
			ans = (ans+dp[cnt])%mymod;
		}

	}
	if (impo)
		cout << 0;
	else {
		if (ans == 0)
			cout << 1;
		else
			cout << ans;
	}
	//system("pause");
}


#include <iostream>
#include <string>

using namespace std;

const int mod = 1e9 + 7, N = 1e5 + 7;

long long arr[N] = { 0, 1, 2 };

int main() {
	for (int i = 3; i < N; i++) {
		arr[i] = (arr[i - 1] + arr[i - 2]) % mod;
	}
	string str;
	cin >> str;
	long long ans = 1;
	int len = str.length();
	for (int i = 0; i < len; i++) {
		if (str[i] == 'm' || str[i] == 'w') {
			ans = 0;
			break;
		}
		if (str[i] == 'u') {
			int cnt = 0;
			while (str[i] == 'u') {
				i++;
				cnt++;
			}
			ans *= arr[cnt];
			ans %= mod;
		}
		if (str[i] == 'n') {
			int cnt = 0;
			while (str[i] == 'n') {
				i++;
				cnt++;
			}
			ans *= arr[cnt];
			ans %= mod;
		}
	}
	cout << (ans % mod) << endl;
	return 0;
}


#include <iostream>
#include <string>

using namespace std;

const int mod = 1e9 + 7, N = 1e5 + 7;

long long arr[N] = { 0, 1, 2, 3};

int main() {
	for (int i = 3; i < N; i++) {
		arr[i] = (arr[i - 1] + arr[i - 2]) % mod;
	}
	string str;
	cin >> str;
	long long ans = 1;
	int len = str.length();
	for (int i = 0; i < len; i++) {
		if (str[i] == 'm' || str[i] == 'w') {
			ans = 0;
			break;
		}
		if (str[i] == 'u') {
			int cnt = 0;
			while (i < len && str[i] == 'u') {
				i++;
				cnt++;
			}
			if (i < len) {
				i--;
			}
			ans *= arr[cnt];
			ans %= mod;
		}
		else if (str[i] == 'n') {
			int cnt = 0;
			while (i < len && str[i] == 'n') {
				i++;
				cnt++;
			}
			if (i < len) {
				i--;
			}
			ans *= arr[cnt];
			ans %= mod;
		}
	}
	cout << ans << endl;
	return 0;
}


// rc.cpp : Defines the entry point for the console application.
//

#include <math.h>

#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <map>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <functional>
#include <iomanip>
#include <iterator>
#include <regex>

using namespace std;

#define PI 3.14159265358979323846
#define EPS 1.E-8

#define FIN(a, n) { for (ul _ = 0; _ < n; ++_) cin >> (a)[_]; }
#define FOUT(a, n) { cout << a[0]; for (ul _ = 1; _ < n; ++_) cout << ' ' << a[_]; cout << '\n'; }

typedef unsigned char uc;
typedef unsigned int ui;
typedef unsigned long long ul;
typedef long long sl;

char s[100002];

ul ff[100002],
   inv[100002],
   mod = 1000000007;

ul ppw(ul x, ul p)
{
    ul r = 1;
    while (p) {
        if (p & 1)
            r = (r * x) % mod;
        x = (x * x) % mod;
        p >>= 1;
    }
    return r;
}

ul getcnk(ul n, ul k)
{
    if (n < k)
        return 0;
    if (n == k)
        return 1;
    if (k == 1 || k == n - 1)
        return n;
    if (k == 2 || k == n - 2)
        return (n * (n - 1) / 2) % mod;

    ul u = ff[n] * inv[k] % mod;
    return (u * inv[n - k]) % mod;
}

ul calc(ul c)
{
    ul r = 1;

    for (ul q = 1; q * 2 <= c; ++q)
        r = (r + getcnk(c - q, q)) % mod;
    return r;
}

int main(int argc, char* argv[])
{
    ios_base::sync_with_stdio(false);
    ff[0] = 1;
    for (ul i = 1; i <= 100001; ++i)
    {
        ff[i] = (ff[i - 1] * i) % mod;
        inv[i] = ppw(ff[i], mod - 2);
    }
    inv[0] = inv[1];

    cin >> s;

    ul r = 1,
       c = 0;
    char p = -1;

    bool ok = true;
    for (int i = 0; s[i] != 1; ++i)
    {
        if (s[i] == 'm' || s[i] == 'w')
        {
            ok = false;
            break;
        }

        if (s[i] == 0)
            s[i + 1] = 1;

        if (s[i] != p)
        {
            if (p == 'n' || p == 'u')
                r = (r * calc(c)) % mod;

            c = 1;
            p = s[i];
        }
        else
            ++c;
    }

    if (!ok)
        r = 0;

    cout << r << endl;
    return 0;
}


#include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
#include <map>
#include <queue>
#include <list>
#include <stack>
#include <set>
#include <string>

#define FOR(a, b, i) for(long long i = a; i < b; ++i)
#define RFOR(a, b, i) for(long long i = a; i > b; --i)

using namespace std;

using ll = int64_t;
using db = double;
using pll = std::pair<ll, ll>;

uint64_t mod = 1000000007;

ll binpow(ll n, ll m)
{
	ll result = 1;
	while (m)
	{
		if (m & 1)
		{
			result *= n;
			--m;
		}
		else
		{
			n *= n;
			m >>= 1;
		}
	}
	return result;
}

ll gcd(ll a, ll b)
{
	while (b)
	{
		a %= b;
		swap(a, b);
	}

	return a;
}

std::vector<int> fib = {1,2};

uint64_t f(std::string& s, uint64_t& pos)
{
	auto start = pos;
	uint64_t count = 0;
	for (; pos < s.size(); ++pos)
		if (s[pos] == s[start])
			++count;
		else
			break;

	--pos;

	uint64_t res = 0;

	if (fib.size() < count)
	{
		for (uint64_t i = fib.size() - 1; i < count; ++i)
		{
			fib.push_back((fib[i - 1] + fib[i])%mod);
		}
	}

	return fib[count - 1];
}

int main()
{
	int q = 1;
//	cin >> q;

	FOR(0, q, w)
	{
		std::string s;
		std::cin >> s;

		uint64_t ans = 1;

		for (uint64_t i = 0; i < s.size(); ++i)
		{
			if (s[i] == 'm' || s[i] == 'w')
				return std::cout << 0, 0;

			if (s[i] == 'u' || s[i] == 'n')
			{
				uint64_t count = f(s, i);
				ans = (ans * count) % mod;
			}
		}

		std::cout << ans;
	}
	return 0;
}


#include<iostream>
#include<cstring>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<cassert>
#include<cmath>
#include<set>
#include<ctime>
#include<functional>
#define lowbit(a) ((a)&-(a))

using namespace std;
typedef long long ll;
const int maxn = 3e5 + 9;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const ll mod = 1e9 + 7;
char s[100100];
ll f[100100],sum[100100],ans=1;

int main()
{

	scanf("%s", s);
	f[1] = 1; f[2] = 2;
	for (int i = 3; i <= strlen(s); i++)
	{
		f[i] = f[i - 1] + f[i - 2];
		f[i] %= mod;
	}
	for (int i = 0; i < strlen(s); i++)
	{
		if (s[i] == 'm' || s[i] == 'w')
		{
			printf("0");
			return 0;
		}
		if (s[i] == 'u' && i + 1 < strlen(s) && s[i + 1] == 'u')
		{
			int now = i;
			while (s[i + 1] == 'u'&&((i+1)<strlen(s)))
			{
				i++;
			}
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
		if (s[i] == 'n' && i + 1 < strlen(s) && s[i + 1] == 'n')
		{
			int now = i;
			while (s[i + 1] == 'n'&&((i+1)<strlen(s))) i++;
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
	}
	printf("%I64d", ans);
	return 0;
}


#include<iostream>
#include<cstring>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<cassert>
#include<cmath>
#include<set>
#include<ctime>
#include<functional>
#define lowbit(a) ((a)&-(a))

using namespace std;
typedef long long ll;
const int maxn = 3e5 + 9;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const ll mod = 1e9 + 7;
char s[10010];
ll f[100100],sum[100100],ans=1;

int main()
{

	scanf("%s", s);
	f[1] = 1; f[2] = 2;
	for (int i = 3; i <= strlen(s); i++)
	{
		f[i] = f[i - 1] + f[i - 2];
		f[i] %= mod;
	}
	for (int i = 0; i < strlen(s); i++)
	{
		if (s[i] == 'm' || s[i] == 'w')
		{
			printf("0");
			return 0;
		}
		if (s[i] == 'u' && i + 1 < strlen(s) && s[i + 1] == 'u')
		{
			int now = i;
			while (s[i + 1] == 'u'&&((i+1)<strlen(s)))
			{
				i++;
			}
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
		if (s[i] == 'n' && i + 1 < strlen(s) && s[i + 1] == 'n')
		{
			int now = i;
			while (s[i + 1] == 'n'&&((i+1)<strlen(s))) i++;
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
	}
	printf("%I64d", ans);
	return 0;
}


#include<iostream>
#include<cstring>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<cassert>
#include<cmath>
#include<set>
#include<ctime>
#include<functional>
#define lowbit(a) ((a)&-(a))

using namespace std;
typedef long long ll;
const int maxn = 3e5 + 9;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int mod = 1e9 + 7;
char s[10010];
ll f[10010],sum[10010],ans=1;

int main()
{

	scanf("%s", s);
	f[1] = 1; f[2] = 2;
	for (int i = 3; i <= strlen(s); i++)
	{
		f[i] = f[i - 1] + f[i - 2];
		f[i] %= mod;
	}
	for (int i = 0; i < strlen(s); i++)
	{
		if (s[i] == 'm' || s[i] == 'w')
		{
			printf("0");
			return 0;
		}
		if (s[i] == 'u' && i + 1 < strlen(s) && s[i + 1] == 'u')
		{
			int now = i;
			while (s[i + 1] == 'u') i++;
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
		if (s[i] == 'n' && i + 1 < strlen(s) && s[i + 1] == 'n')
		{
			int now = i;
			while (s[i + 1] == 'n') i++;
			int cnt = i - now + 1;
			ans *= f[cnt];
			ans %= mod;
		}
	}
	printf("%I64d", ans);
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_set>
#include <string>

using namespace std;

long long f[100001];
int last = 1;

int fib(int n) {
	if (!f[n]) {
		for (int i = ++last; i <= n;++i) {
			f[i] = (f[i - 1] + f[i - 2])%1000000007;
		}
		last = n;
	}
	return f[n];
}

int main() {
	f[0] = f[1] = 1;
	string str;
	cin >> str;
	char flag = false;
	int len = str.length();
	long long res = 1, countU = 0, countN = 0;
	for (int i = 0; i < len; ++i) {
		if (str[i] == 'm' || str[i] == 'w') {
			res = 0;
			break;
		}
		if (str[i] == 'u') ++countU;
		else {
			res *= fib(countU);
			countU = 0;
		}
		if (str[i] == 'n') ++countN;
		else {
			res *= fib(countN);
			countN = 0;
		}
		res %= 1000000007;
	}
	res = res * fib(countN) * fib(countU) % 1000000007;
	cout << res;
	/*system("pause");*/
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_set>
#include <string>

using namespace std;

long long f[100001];
int last = 1;

int fib(int n) {
	if (!f[n]) {
		for (int i = ++last; i <= n;++i) {
			f[i] = (f[i - 1] + f[i - 2])%1000000007;
		}
		last = n;
	}
	return f[n];
}

int main() {
	f[0] = f[1] = 1;
	string str;
	cin >> str;
	char flag = false;
	int len = str.length();
	long long res = 1, countU = 0, countN = 0;
	for (int i = 0; i < len; ++i) {
		if (str[i] == 'm' || str[i] == 'w') {
			res = 0;
			break;
		}
		if (str[i] == 'u') ++countU;
		else {
			res *= fib(countU);
			countU = 0;
		}
		if (str[i] == 'n') ++countN;
		else {
			res *= fib(countN);
			countN = 0;
		}
		res %= 1000000007;
	}
	res *= fib(countN) * fib(countU);
	cout << res;
	/*system("pause");*/
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_set>
#include <string>

using namespace std;

int f[100001];
int last = 1;

int fib(int n) {
	if (!f[n]) {
		for (int i = ++last; i <= n;++i) {
			f[i] = (f[i - 1] + f[i - 2])%1000000007;
		}
		last = n;
	}
	return f[n];
}

int main() {
	f[0] = f[1] = 1;
	string str;
	cin >> str;
	char flag = false;
	int countU = 0, countN = 0 , len = str.length(), res =1;
	for (int i = 0; i < len; ++i) {
		if (str[i] == 'm' || str[i] == 'w') {
			res = 0;
			break;
		}
		if (str[i] == 'u') ++countU;
		else {
			res *= fib(countU);
			countU = 0;
		}
		if (str[i] == 'n') ++countN;
		else {
			res *= fib(countN);
			countN = 0;
		}
		res %= 1000000007;
	}
	res *= fib(countN) * fib(countU);
	cout << res;
	/*system("pause");*/
	return 0;
}


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

int main()
{
	string s;
	long long ans = 1;
	cin >> s;
	if (s.find('w') != -1 || s.find('m') != -1)
		cout << 0;
	else
	{
		int j = 0;
		for (int i = 0; i < s.size(); i++)
		{
			if (s[i] == 'u')
			{
				for (int u = i; u < s.size() && s[u] == 'u'; u++, i++)
					j++;
				if (j > 1)
					ans *= j, ans %= 1000000007;
				j = 0, i--;
			}
			if (s[i] == 'n')
			{
				for (int u = i; u < s.size() && s[u] == 'n'; u++, i++)
					j++;
				if (j > 1)
					ans *= j, ans %= 1000000007;
				j = 0, i--;
			}
		}
		cout << ans;
	}
	return 0;
}


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

int main()
{
	string s;
	deque<int>A;
	cin >> s;
	if (s.find('w') != -1 || s.find('m') != -1)
		cout << 0;
	else
	{
		A.push_back(1), A.push_back(1);
		for (int i = 1; i < s.size(); i++)
		{
			if (s[i] == s[i - 1] && (s[i] == 'n' || s[i] == 'u'))
				A.push_back((A[i] + A[i - 1]) % 1000000007);
			else
				A.push_back(A[i]);
		}
		cout << A[s.size()];
	}
	return 0;
}


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

int main()
{
	string s;
	long long ans = 0;
	cin >> s;
	if (s.find('w') != -1 || s.find('m') != -1)
		cout << 0;
	else
	{
		int j = 0;
		for (int i = 0; i < s.size(); i++)
		{
			if (s[i] == 'u')
			{
				for (int u = i; u < s.size() && s[u] == 'u'; u++, i++)
					j++;
				if (j > 1)
					ans += j;
				j = 0, i--;
			}
			if (s[i] == 'n')
			{
				for (int u = i; u < s.size() && s[u] == 'n'; u++, i++)
					j++;
				if (j > 1)
					ans += j;
				j = 0, i--;
			}
		}
		ans += ans == 0;
		cout << ans;
	}
	return 0;
}


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

int main()
{
	string s;
	long long ans = 1;
	cin >> s;
	if (s.find('w') != -1 || s.find('m') != -1)
		cout << 0;
	else
	{
		int j = 0;
		for (int i = 0; i < s.size(); i++)
		{
			if (s[i] == 'u')
			{
				for (int u = i; u < s.size() && s[u] == 'u'; u++, i++)
					j++;
				if (j > 1)
					ans *= j, ans += j / 2 - 1, ans %= 1000000007;
				j = 0, i--;
			}
			if (s[i] == 'n')
			{
				for (int u = i; u < s.size() && s[u] == 'n'; u++, i++)
					j++;
				if (j > 1)
					ans *= j, ans += j / 2 - 1, ans %= 1000000007;
				j = 0, i--;
			}
		}
		cout << ans;
	}
	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string token = "0", s;
	ll i,j,lnt;
	cin >> s;
	token.append(s);

	lnt = token.length() - 1;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 5] = { 0 };
	dp[0] = 1;
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i <= lnt; i++)
	{
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 1; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

	}

	for (i = 0, j = 0; i <= lnt; i = j) {
		while (j <= lnt && s[j] == s[i])
			j++;
		if (s[i] == 'n' || s[i] == 'u')
			ans = ans * dp[j - i] % 1000000009;
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string token;
	ll i,j,lnt;
	cin >> token;

	lnt = token.length();

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 5] = { 0 };
	dp[0] = 1;
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i <= lnt; i++)
	{
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 0; i < lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

	}

	for (i = 0, j = 0; i < lnt; i = j) {
		while (j < lnt && token[j] == token[i])
			j++;
		if (token[i] == 'n' || token[i] == 'u')
			ans = ans * dp[j - i] % 1000000009;
	}

	cout << ans;

	return 0;
}