Single Source Shortest Path-BFS

In SSSP BFS shortest distance from 0 to 5 is 3 and path is 0->3->4->5 how can we get this path printed?? bcz in question we have to find path ?Kindly help resolve this.