Prints in a given format