There are two possible answers here
Both are equally valid. I suppose the second version is more formal, but I think it's somewhat clunky since it's longer compared to the first version.