Coloured knots and permutations representing 3-manifolds