I see comments suggesting not to remove the ribbon cable. This would work. Simply flip the fan like the page of a book, from right to left, thereby getting it out of the way while you remove the i/o board. Flip it from left to right when you reinstall. This approach would save some frustration, as it is a challenge to reinsert that tiny ribbon into position.
If you do remove the ribbon, reinsert it before repositioning the fan. That will give you more play as to fiddle with the ribbon.