sentences:  In 1397 thanks to Queen Jadwiga of Poland, a Carmelite convent was established in the city, the third in Poland after Gdańsk and Kraków.During the Polish–Lithuanian–Teutonic War in 1409 the city was briefly captured by the Teutonic Knights.In the mid-15th century, during the Thirteen Years' War, King Casimir IV of Poland often stayed in Bydgoszcz.