#include<iostream>
#include<string>
#include"List.h"
using namespace std;
int main(){
List<string> s;
s.push_front("T"); s.push_front("N"); s.push_front("G"); s.push_front("A");
for (List<string>::
Iterator si = s.begin(); si != s.end(); ++si) cout << *si;
cout << endl;
List<string>::
Iterator sj = s.end(); cout << *(sj--);
cout << *(sj--);
cout << *(sj--);
cout << *(sj--)<< endl;
List<string> t;
t.push_back("A"); t.push_back("G"); t.push_back("N"); t.push_back("T");
List<string>::
Iterator ti;
for (ti = t.begin(); ti != t.end(); ++ti) cout << *ti;
cout << endl;
ti = t.begin();
ti++; ti++;
t.insert(ti, "E");
cout << t << endl;
for (ti =t.begin(); ti != t.end(); ++ti)
t.insert(ti, "-");
t.insert(ti, "-");
cout << t << endl;
for (ti =t.begin(); ti != t.end(); ++ti){
ti = t.erase(ti);
}
cout << t << endl;
List<int> i1;
i1.push_back(5); i1.push_back(7); i1.push_back(15); i1.push_back(28);
List<int> i2;
i2.push_back(2); i2.push_back(6); i2.push_back(8); i2.push_back(21);
i1.merge(i2); cout << i1 << endl; cout << i2 << endl;
List<int> x;
x.push_back(3); x.push_back(1); x.push_back(33); x.push_back(13);
x.push_back(15); x.push_back(28); x.push_back(21); x.push_back(2);
x.sort();
cout << x << endl;
return 0;
}