Position of an ugly number
if arr [ i ] == - 1 : NEW_LINE INDENT print ( list [ j ] , end = " ▁ " ) NEW_LINE j += 1 NEW_LINE DEDENT else : NEW_LINE INDENT print ( arr [ i ] , end = " ▁ " ) NEW_LINE DEDENT