Construct a graph
g [ 0 ] . append ( 3 ) NEW_LINE g [ 0 ] . append ( 1 ) NEW_LINE g [ 0 ] . append ( 2 ) NEW_LINE g [ 1 ] . append ( 3 ) NEW_LINE g [ 2 ] . append ( 0 ) NEW_LINE g [ 2 ] . append ( 1 ) NEW_LINE src = 2 NEW_LINE dst = 3 NEW_LINE print ( " path ▁ from ▁ src ▁ { } ▁ to ▁ dst ▁ { } ▁ are " . format ( src , dst ) ) NEW_LINE