Traversal Of Nodes
Please help for this on  C or C++ or Java Program.


                          A1
                                                   A1->B1, A1->B2, A1->B3

                     
          B1              B2           B3
                                          B1->C1,B1->C2,B1->C3,B2->C3,B2->C4,B3->C5,B3->C6 


C1     C2      C3      C4       C5     C6

                                    C1->D1,C2->D1,C3->D1,C3->D2,C4->D2,C4->D3,C5->D3,C6->D3

          D1              D2           D3

                                                  D1->E1,D2->E1,D3->E1

                          E1


(All are on top to bottom only)

From this , how can I traverse all the nodes.
ie.

A1-->B1-->C2-->D1-->E1

A1-->B2-->C4-->D2-->E1

A1-->B3-->C5-->D3-->E1

A1-->B2-->C3-->D2-->E1  ,........

Thing is that don't repeat any nodes again & find out all the possibilities from A ->E.

ALSO

How can I give input as 
a)Total number of nodes 
b)Node names(A1,A2,..)  
c)Branch &
d)Sub Branch

Please help the program on C or C++ or Java.

Traversal Of Nodes
===

Please help for this on  C or C++ or Java Program.


                          A1
                                                   A1->B1, A1->B2, A1->B3

                     
          B1              B2           B3
                                          B1->C1,B1->C2,B1->C3,B2->C3,B2->C4,B3->C5,B3->C6 


C1     C2      C3      C4       C5     C6

                                    C1->D1,C2->D1,C3->D1,C3->D2,C4->D2,C4->D3,C5->D3,C6->D3

          D1              D2           D3

                                                  D1->E1,D2->E1,D3->E1

                          E1


(All are on top to bottom only)

From this , how can I traverse all the nodes.
ie.

A1-->B1-->C2-->D1-->E1

A1-->B2-->C4-->D2-->E1

A1-->B3-->C5-->D3-->E1

A1-->B2-->C3-->D2-->E1  ,........

Thing is that don't repeat any nodes again & find out all the possibilities from A ->E.

ALSO

How can I give input as 
a)Total number of nodes 
b)Node names(A1,A2,..)  
c)Branch &
d)Sub Branch

Please help the program on C or C++ or Java.
