If ans string is empty or its last character does not match with the current character then append this character to the string
if ( ans == " " or ans [ - 1 ] != it ) : NEW_LINE INDENT ans += it ; NEW_LINE DEDENT