A bug starts at one vertex of a triangular prism and moves along its edges. At each vertex, the bug chooses one of the three edges emanating from that vertex with equal probability. All choices are independent. What is the probability that after five moves the bug will have visited every vertex exactly once?