Driver code
public static void Main ( String [ ] args ) { String s = " xyz " ; HashSet < String > st = new HashSet < String > ( ) ; generate ( st , s ) ; foreach ( String str in st ) { Console . WriteLine ( str ) ; } } }