Formalize the ouput as specified.