using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ListaInterfata
{
    class Element
    {
        private Object info;
        private Element next;

        public Element(object _info, Element _next)
        {
            info = _info;
            next = _next;
        }

        public Object Info
        {
            get { return info; }
        }

        public Element Next
        {
            get { return next; }
        }

        public void InitNext(Element el)
        {
            next = el;
        }

        public override Boolean Equals(Object obj)
        {
            return info == obj;
        }

        public override int GetHashCode()
        {
            return info.GetHashCode();
        }

        public override string ToString()
        {
            return info.ToString();
        }
    }
}
