Input Output Program Using Inheritance