using System.Collections.Generic;
public static void Main(String[] args)
ColonyManagement manager= new ColonyManagement();
int n=Convert.ToInt32(Console.ReadLine());
int flatno=Convert.ToInt32(Console.ReadLine());
string ownername=Console.ReadLine();
string flattype=Console.ReadLine();
double rent=Convert.ToDouble(Console.ReadLine());
int inmatesc=Convert.ToInt32(Console.ReadLine());
manager.colonyList.Add(new Colony(flatno,ownername,flattype,rent,inmatesc));
string type=Console.ReadLine();
List<Colony> list =manager.Method2(type);
Console.WriteLine("no colony found with the given flat type");
foreach(Colony f in list)
Console.WriteLine("{0}${1}${2}${3}${4}",f.flatno,f.ownername,f.flattype,f.rents,f.inmatesc);
public int flatno{get; set;}
public string ownername{get;set;}
public string flattype{get; set;}
public double rents{get;set;}
public int inmatesc{get; set;}
public Colony(int no,string name,string flat,double rent,int inmates)
public List<Colony> colonyList=new List<Colony>();
public List<Colony> Method2(string flattype)
List<Colony> newList=new List<Colony>();
foreach(Colony c in colonyList)
if(c.flattype.ToLower()==flattype.ToLower() && c.inmatesc>8)
c.rents=c.rents-incamount;