Print answer only in the end