#include <iostream>
using std::cout;



class CList
{
public:    
	class CNode
	{
	public:
		int value;
		CNode* next;

		CNode(int v, CNode* p = NULL) : value(v), next(p) {}
	};

	CNode* front;
	CNode* back;

	CList() 
	{ 
		front = back = NULL;
	}

	CList(int v)
	{
		front = back = new CNode(v);		
	}

	void Print()
	{
		CNode* p;
		for (p=front; p!=NULL; p=p->next)
			cout << p->value << " -> ";
		cout << "NIL \n";
	}

	void push_front(int v)
	{
		front = new CNode(v, front);
	}
		
};
