The city is famous since medieval times for granite buildings in 16th century . Its history dates back to medieval times and granite buildings from the early 16th century still line some of the streets .