<garvit244>1047_1.py
def removeDuplicates( S):
    stack = []
    if not S:
        return ""
    for char in S:
        if not stack:
            stack.append(char)
        else:
            first = stack[-1]
            if first == char:
                stack.pop()
            else:
                stack.append(char)
    if not stack:
        return ""
    return ''.join(stack)
def sample_funcname ( var_0 ) :
    var_1 = [ ]
    if not var_0 :
        return ""
    for var_3 in var_0 :
        if not var_1 :
            var_1.append ( var_3 )
        else :
            var_6 = var_1 [ - 1 ]
            if var_6 == var_3 :
                var_1.pop ( )
            else :
                var_1.append ( var_3 )
    if not var_1 :
        return ""
    return ''.join ( var_1 )
