here the absolute difference of ascii value is considered
if ( abs ( ord ( s [ i ] ) - ord ( ' a ' ) ) > abs ( ord ( s [ i ] ) - ord ( ' e ' ) ) ) : NEW_LINE INDENT s [ i ] = ' e ' NEW_LINE DEDENT else : NEW_LINE INDENT s [ i ] = ' a ' NEW_LINE DEDENT elif s [ i ] > ' e ' and s [ i ] < ' i ' : NEW_LINE if ( abs ( ord ( s [ i ] ) - ord ( ' e ' ) ) > abs ( ord ( s [ i ] ) - ord ( ' i ' ) ) ) : NEW_LINE INDENT s [ i ] = ' i ' NEW_LINE DEDENT else : NEW_LINE INDENT s [ i ] = ' e ' NEW_LINE DEDENT elif ( s [ i ] > ' i ' and s [ i ] < ' o ' ) : NEW_LINE if ( abs ( ord ( s [ i ] ) - ord ( ' i ' ) ) > abs ( ord ( s [ i ] ) - ord ( ' o ' ) ) ) : NEW_LINE INDENT s [ i ] = ' o ' NEW_LINE DEDENT else : NEW_LINE INDENT s [ i ] = ' i ' NEW_LINE DEDENT elif ( s [ i ] > ' o ' and s [ i ] < ' u ' ) : NEW_LINE if ( abs ( ord ( s [ i ] ) - ord ( ' o ' ) ) > abs ( ord ( s [ i ] ) - ord ( ' u ' ) ) ) : NEW_LINE INDENT s [ i ] = ' u ' NEW_LINE DEDENT else : NEW_LINE INDENT s [ i ] = ' o ' NEW_LINE DEDENT