What the devil to do with the sentence "Who the devil does he think he's fooling?" You can't write "Whom the devil- ".
or simply: