Changed the print method to correct the output for print(head,head) to an empty output