ION Group Interview Question

One puzzle was asked ( priest and demon)