static void Main(string[] args)
        {
            // ------ TASK 1 --------
            var collection1 = new CollectionType<string>();
            collection1.Insert("first element");
            collection1.Insert("second element");
            Console.Write("Collection: ");
            collection1.Print();
            Console.WriteLine("Access by index: {0}", collection1[1]);

            // --------- TASK 2 --------
            var collection2 = new CollectionType<Figure>();
            var fig1 = new Figure(1, 1, "A");
            var fig2 = new Figure(2, 2, "B");
            var fig3 = new Figure(3, 3, "C");
            var fig4 = new Figure(4, 4, "D");
            collection2.Insert(fig1);
            collection2.Insert(fig4);
            collection2.Insert(fig3);
            collection2.Insert(fig2);
            collection2.Print();
            collection2.WriteToFile("collection.txt");
            Console.Write("Minimum: {0}", collection2.GetMin());
            Console.Write("Maximum: {0}", collection2.GetMax());
            Console.Write("Of size 2: {0}", collection2.GetCollectionOfSize(2));

            // --------- TASK 3 --------
            Console.WriteLine("***********");
            var linkedLst = new LinkedList<string>();
            linkedLst.AddLast("123");
            linkedLst.AddLast("456");
            linkedLst.AddLast("1");
            linkedLst.AddLast("12345");
            linkedLst.AddLast("oppasadjn");
            linkedLst.AddLast("4815162342");
            var stream = new StreamWriter("linkedList.txt");
            foreach (var vr in linkedLst)
            {
                Console.WriteLine(vr);
                stream.WriteLine(vr);
            }
            stream.Close();
            Console.WriteLine("Find 123: {0}", linkedLst.Contains("123"));
            Console.WriteLine("Sorted linked list:");
            foreach (var vr in linkedLst.OrderBy(i => i))
            {
                Console.WriteLine(vr);
            }
            Console.WriteLine("Sorted linked list in back order:");
            foreach (var vr in linkedLst.OrderByDescending(i => i))
            {
                Console.WriteLine(vr);
            }
            Console.WriteLine("Number of strings with length of 3: {0}", GetCountByLength(linkedLst, 3));

            Console.WriteLine("Min element: {0}", linkedLst.Select(i => i).Min());
            Console.WriteLine("Max element: {0}", linkedLst.Select(i => i).Max());
            Console.WriteLine("Number of strings with length LINQ: {0}", linkedLst.Count(i => i.Length == 3));

            Console.ReadKey();
        }