Sofia Vergara is usually the one helping contestants out on the “America’s Got Talent” stage and Tuesday was no different.

The actress and fellow judges Heidi Klum and Howie Mandel helped out mentalist Peter Antoniou, as each picked a mystery can before telling him their favourite foods.

After successfully guessing what was in each can despite being blindfolded, Antoniou then asked Vergara to remain on the stage. Simon Cowell was tasked with choosing one of four cans that had pineapple in it as opposed to meat from a pig’s or calf’s head with jelly (a.k.a. brawn), with Vergara having to eat whatever was in the can he chose.

The “Modern Family” star complained, “Why do I have to be the one punished?” adding: “Why me always?”

RELATED: ‘AGT’: 9-Year-Old Opera Singer Victory Brinker Blows Judges Away With Stunning Performance

Luckily for Vergara, Cowell picked the can containing the delicious fruit.

Not ending his impressive act there, Antoniou then asked Cowell to read out what was written on a piece of paper in the closed can in front of him — it was each of the judges’ favourite dishes.

Cowell told Antoniou, “You are a wizard!”

RELATED: ‘AGT’: Korean Soul Put Their Own Spin On Aerosmith’s ‘I Don’t Want To Miss A Thing’

See more from the performance in the clip above.