Knots and braids on the Sun