The titular Gulliver from Jonathon Swift’s 1726 novel is flexible. He grew up with some education and was given a “scantly allowance.” Gulliver is neither impoverished nor a member of the aristocracy. As a middle-class man, Gulliver can interact with a variety of people, from kings to servants.
Gulliver discovers many islands in his travels. He observes the different nations, and for his safety, navigates accordingly. In the first adventure, Gulliver discovers that the miniature nation of Lilliput is ruled by an Emperor who appoints court officials with a rope dance, regardless of their qualifications. Impressing the Emperor is the most important thing someone can do in Lilliput, so Gulliver gains favor by capturing the Blefuscudian fleet.
Gulliver quickly learns new languages. In Brobdingnag, he becomes articulate enough to please the giantess queen. She asks him if he wants to become her pet, to which Gulliver swallows his pride and lies, “I should be proud to devote my life to her Majesty's service.”
Similarly, Gulliver talks his way out of a ritual in Japan. The test forces people to prove they are not members of Christianity by walking over a crucifix. Gulliver avoids the situation by appealing to Japan’s Emperor:
for the sake of my patron the king of Luggnagg, his majesty would condescend to excuse my performing the ceremony…of tramping upon the crucifix.
Gulliver survives his many journeys by tricking, appeasing, and fleeing from exotic nations.