이 문제인데 내가 짠 코드는 저거대로 나오긴하는데 이 연관관계 없이 List<Pet>의 자료형으로써 를 못하겠음 알려주세오

using System;
using System.Collections.Generic;
namespace testfile
{
    class Program
    {
        class Pet
        {
            public string petname;
            public int age;
        }
        class Person{
            public string name;
            public string address;
            
        }


        static void Main(string[] args)
        {
  
            Person person = new Person();
            List<Pet> list = new List<Pet>();
            list.Add(new Pet() { petname = "구름", age = 7 });
            list.Add(new Pet() { petname = "", age = 1 });
            person.name = "윤인성";
            person.address = "서울특별시";
            Console.WriteLine("이름:" + person.name + "\n주소:" + person.address);
            foreach (var item in list)
            {
                Console.WriteLine("반려동물 이름: " + item.petname + " 나이: " + item.age);
            }
        }
    }
}