Resolved print issue using main method of InheritancePractice