Find the minimum of all common elements
if ( i > 1 and ans [ i - 1 ] != - 1 ) : NEW_LINE INDENT if ( ans [ i ] == - 1 ) : NEW_LINE INDENT ans [ i ] = ans [ i - 1 ] NEW_LINE DEDENT else : NEW_LINE INDENT ans [ i ] = min ( ans [ i ] , ans [ i - 1 ] ) NEW_LINE DEDENT DEDENT print ( ans [ i ] , end = " ▁ " ) NEW_LINE