#include<iostream.h>
using namespace std;

int P,C[4],R[4],V[4] = {1,5,10,25},G[4];
char* N[4] = {" cents, "," nickels, "," dimes, and "," quarters."};
int max = 0;

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

void reset() {max = 0; for(int c = 0; c < 4; c++) {G[c] = 0; R[c] = 0;}}

bool findprice(int p, int d)
{
	bool r = false;
	int m = min(C[d],p/V[d]);
	for(R[d]=m; R[d]>=0; R[d]--)
	{
		if(R[d]*V[d] == p)
		{
			if(R[0]+R[1]+R[2]+R[3] > max)
			{G[0] = R[0]; G[1] = R[1]; G[2] = R[2]; G[3] = R[3];}
			r = true;
		}
		else if(d>0 && findprice(p-R[d]*V[d], d-1)) r = true;
	}
	return r;
}

int main()
{
	cin >> P >> C[0] >> C[1] >> C[2] >> C[3];
	while(P>0 && !cin.eof())
	{
		reset();
		if(findprice(P,3))
		{cout << "Throw in ";
		for(int c = 0; c< 4; c++) cout << G[c] << N[c];
		cout << endl;
		}
		else cout << "Charlie cannot buy coffee." << endl;
		cin >> P >> C[0] >> C[1] >> C[2] >> C[3];
	}
	return 0;
}
