Printing minimum in each iteration print the value if output is not equal to current value ( to avoid the duplicates )
if ( output != next [ toincrement ] ) : NEW_LINE INDENT output = next [ toincrement ] ; NEW_LINE print ( next [ toincrement ] , end = " ▁ " ) ; NEW_LINE i += 1 ; NEW_LINE DEDENT