int cnt{  };
typedef struct ty* pos;
struct ty {
	int* a;
	int maxsize;
	int f, nex;
};
void cre(pos& l, int s)
{
	l = new ty;
	l->a = new int[s];
	l->maxsize = s;
	l->f = l -> nex = 0;
}
bool ept(pos l)
{
	return (l->f == l->nex);
}
bool full(pos l)
{
	return (l->f == (l->nex + 1) % l->maxsize);
}
void add(pos l, int aa)
{
	if ( full(l) )
	{
		cout << "full" << endl;
		return;
	}
	l->nex = (l->nex + 1) % l->maxsize;
	l->a[l->nex] = aa;
}
void del(pos l)
{
	if ( ept(l) ) {
		cout << "    fas" << endl;
		return;
	}
	l->f = (l->f + 1) % l->maxsize;
	cout << l->a[l->f] << endl;
}

int main(int args, char** argv)
{
	/*ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cin.tie(nullptr);*/
	pos l;
	cre(l, 5);
	add(l, 14);
	add(l, 23);
	add(l, 230);
	add(l, 213);
	add(l, 273);
	add(l, 236);
	del(l);
	del(l);
	del(l);
	del(l);
	del(l);
	del(l);
	return 0;
}