As shown in the figure, the path can be generated by the following code
n=5;
Select[Tuples[{1,2,3},n],#[[1]]==1&&#[[-1]]!=1&&AllTrue[Partition[#,2,1],Unequal@@#&]&]
{{1,2,1,2,3},{1,2,1,3,2},{1,2,3,1,2},{1,2,3,1,3},{1,2,3,2,3},{1,3,1,2,3},{1,3,1,3,2},{1,3,2,1,2},{1,3,2,1,3},{1,3,2,3,2}}
I also know how to draw a binary tree
CompleteKaryTree[n, 2, VertexLabels -> {x_ :> Placed[F[x], Center]}, VertexSize -> 0]