using System;
public class first
{    
}
public class second:first{
public string b=" second";
public override string ToString()
{
string result="this is "+b;
return result;
}
}
public class third :second{
public string c=" third";
public override string ToString()
{   
string result="this is "+c;
return result;
}
public static void Main(){
object b=new second();
third c=new third ();
Console.WriteLine(b.ToString());
Console.WriteLine(c.ToString());
Console.ReadLine();
}
}