Added toString() method to queue and stack