#include <iostream>

using namespace std;

template <typename E>
class DLinkedList {
private:
struct DNode { E elem; DNode* prev; DNode* next; };
DNode *header , *trailer;
int numberOfElements;
public:
DLinkedList()
{
header = new DNode;
trailer = new DNode;
header ->next = trailer;
trailer ->prev = header;
numberOfElements = 0;
}

virtual ~DLinkedList();
class Iterator 
{
private:
DNode* current;
Iterator(DNode* u){current=u;}
public:
E& operator*(){ return current->elem; }// ref. to the element
Iterator& operator++(){current = current->next;
            return *this;}
            
Iterator& operator --()
{ current = current->prev;
            return *this;}
            
bool operator==(const Iterator& it) const
{
return current == it.current;
}
bool operator!=(const Iterator& it) const
{ 
            return current != it.current;}
friend class DLinkedList;
}; 

bool empty() const
{
return (numberOfElements == 0);
}

int size() const
{
return numberOfElements;
}

E& front() const
{
return header ->next ->elem;
}

E& back() const
{
return trailer ->prev ->elem;
}
void push_front(const E& e);

void push_back(const E& e);

void pop_front();

void pop_back();


Iterator begin() const
{
return Iterator(header ->next);
}
Iterator end() const
{
return Iterator(trailer);
}
void insert(const Iterator& it, const E& e);
void erase(const Iterator& it);
}; 




template <typename E>
bool containsSublist(DLinkedList<E>& L,DLinkedList<E>& S)
{

if (S.empty()) return true;

for(it = L.begin();it!=L.end(); it++)

while(it!=L.end() && ot!=S.end() )
   {
    if(ot=)  return true;
    }
   }return false;
 }




