#include "partition.h"
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
bool chetnost[MAXN];
vector<int> solve(vector<int> A) {
    vector<int> otg1, otg2;
    for(int i = 0; i < A.size(); i++)
    {
        if(!chetnost[A[i]])
        {
            otg1.push_back(A[i]);
            chetnost[A[i]] = true;
        }
        else
        {
            otg2.push_back(A[i]);
            chetnost[A[i]] = false;
        }
    }
    vector<int> otg;
    for(int i = 0; i < otg1.size(); i++)
    {
        otg.push_back(otg1[i]);
    }
    for(int i = 0; i < otg2.size(); i++)
    {
        otg.push_back(otg2[i]);
    }
    return otg;
}
