the castle was built during the reign of stephen the first of hungary