Municipality with a complicated history, known since 1233, surrounded by the territory of Poland from three sides