// editor2
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct dbl
{
    char data;
    struct dbl *next,*prev;
}node;

node *head=NULL,*tail=NULL;
void create(char c)
{
    node *nd=(node*)malloc(sizeof(node));
    strcpy(nd->data,c);
    nd->next=nd->prev=NULL;
    if(head==NULL)
    {
        head=tail=nd;
    }
    else
    {
        nd->prev=tail;
        tail->next=nd;
        tail=nd;
    }
}

void print()
{
    node *temp=head;
    while(temp->next!=NULL)
    {
        node *temp2=temp->next;
        while(temp2!=NULL)
        {
            if(temp->data==temp2->data)
            {
                temp2->prev->next=temp2->next;
                temp2->next->prev=temp2->prev;
            }
            temp2=temp2->next;
        }
        temp=temp->next;
    }
    
    node *ptr=head;
    while(ptr!=NULL)
    {
        printf("%c",ptr->data);
        ptr=ptr->next;
    }
}

int main()
{
    int n;
    char c;
    scanf("%d",&n);
    if(n<0)
    {
        printf("Invalid input");
        return 0;
    }
    for(int i=0;i<n;i++)
    {
        scanf("%c",c);
        create(c);
    }
    print();
}