Fixed a printing error
Added support for more than 2 grades