He certainly did nothing to conciliate the favour of the government by his next work, The Beggar's Opera, a ballad opera produced on the 29 January 1728 by John Rich, in which Sir Robert Walpole was caricatured. This famous piece, which was said to have made "Rich gay and Gay rich", was an innovation in many respects. The satire of the play has a double allegory. The character of Peachum was inspired by the thief-taker Jonathan Wild, executed in 1725, and the principal figure of Macheath reflected memories of the French highwayman, Claude Duval, whose execution had created a sensation in London, and who exemplified the flamboyance and gallantry of Gay's literary hero. Gay's decision to launch the work was probably also influenced by the huge interest that Jack Sheppard, a cockney housebreaker, had created in all things relating to Newgate Prison. However, the character of Peachum was also understood to represent Robert Walpole, who, like Wild, was seen as a public but morally dubious character, and whose government had been tolerant of Wild's thievery and the South Sea directors' escape from punishment. Under cover of the thieves and highwaymen who figured in it was disguised a satire on society, for Gay made it plain that in describing the moral code of his characters he had in mind the corruptions of the governing class. Part of the success of The Beggar's Opera may have been due to the acting of Lavinia Fenton, afterwards Duchess of Bolton, in the part of Polly Peachum. The play ran for sixty-two nights. Swift is said to have suggested the subject, and Pope and Arbuthnot were constantly consulted while the work was in progress, but Gay must be regarded as the sole author. After seeing an early version of the work, Swift was optimistic of its commercial prospects but famously warned Gay to be cautious with his earnings: "I beg you will be thrifty and learn to value a shilling."