Task for Apex Developer Job Interview: SObject records field values swap

A small task for Apex Developer Job Interviews which requires Apex-specific knowledge, shouldn’t take much time and can give you an impression about applicant skills.
Assuming we have two Opportunity records and we need to swap their “Close Date” field values. The task is to do it w/o introducing any additional variables:
Opportunity opportunityA = new Opportunity(CloseDate = System.today());
Opportunity opportunityB = new Opportunity(CloseDate = System.today().addDays(10));
//magic goes here
System.debug(opportunityA.CloseDate);//today + 10 days
System.debug(opportunityB.CloseDate);//today
What we’re trying to get in response is for applicant to leverage SObject.put
method’s return value, so that result will look like this:
Opportunity opportunityA = new Opportunity(CloseDate = System.today());
Opportunity opportunityB = new Opportunity(CloseDate = System.today().addDays(10));
opportunityA.put(Opportunity.CloseDate, opportunityB.put(Opportunity.CloseDate, opportunityA.CloseDate));
System.debug(opportunityA.CloseDate);//today + 10 days
System.debug(opportunityB.CloseDate);//today
Initial requirements narrowed down to an Opportunity SObject and “Close Date” field on purpose — so that not to give applicant a hint to look into generic SObject methods right away and test their ability to see a bigger picture and think outside the box themselves.