The church in the Middle Ages