print input and output in same format