Driver code
public static void Main ( string [ ] args ) { n = 4 ; s = new Stack < int > ( ) ; adj = new ArrayList ( ) ; tsort = new ArrayList ( ) ; for ( int i = 0 ; i < 4 ; i ++ ) adj . Add ( new ArrayList ( ) ) ;