Solution to problem id revc.