   function [Lst,Mark] = TopSort(L) 
%% function [Lst,Mark] = TopSort(L) 

 n = size(L,1);
 Mark = zeros(n,1); Lst = [];

 for k=1:n
   fprintf(1,'traversal from %d\n',k)
   if (Mark(k) == 0) 
     [Lst, Mark] = dfs(k, L, Lst, Mark);
   end
 end
