template<class type>
Chain<type> LinearList<type>::Convert()
{
Chain<type> x;
ChainNode<type> *y, *z = 0;
for (int i = length - 1; i >= 0; i--) {
   y = new ChainNode<type>;
   y->data = element[i];
   y->link = z; z = y;
   }
x.first = z;
ChainNode<type> *q;
for (q=x.first; q; q = q->link) cout << q->data;
cout << endl;
return x;
}
