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

namespace Y3
{
    class Program
    {
        static void Main(string[] args)
        {
            DocumentManager<int> docs = new DocumentManager<int>();
            Console.WriteLine(docs.IsDocumentAvailable());
            docs.AddDocument(1);
            docs.AddDocument(2);
            Console.WriteLine(docs.GetDocument(1));
            Console.WriteLine(docs.IsDocumentAvailable());
            Console.ReadLine();
        }
    }

    public class DocumentManager<T>
    {
        private List<T> liste;
        
        public DocumentManager()
        {
            liste = new List<T>();
        }

        public void AddDocument(T doc)
        {
            liste.Add(doc);
        }

        public T GetDocument(int i)
        {
            return liste.ElementAt(i);
        }

        public bool IsDocumentAvailable()
        {
            return liste.Count > 0;
        }
    }
}
