#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <cstdio>
#include <bitset>
#include <functional>
#include <tuple>
#include <list>
#include <deque>
using namespace std;
typedef pair<int, int> P;

#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;

vector<int> vec;
int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    REP(i, n) {
        int a; cin >> a;
        vec.push_back(a);
    }
    
    vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
    for(int i=0; i<vec.size(); ++i){
        if(i) cout << " ";
        cout << vec[i];
    }
    cout << endl;
	return 0;
}

### Prompt

Create a solution in CPP for the following problem:

For a sequence of integers $A = \\{a_0, a_1, ..., a_{n-1}\\}$ which is sorted by ascending order, eliminate all equivalent elements.

Constraints

* $1 \leq n \leq 100,000$
* $-1000,000,000 \leq a_i \leq 1,000,000,000$
* $a_0 \leq a_1 \leq ... \leq a_{n-1}$

Input

A sequence is given in the following format.


$n$
$a_0 \; a_1 \; ,..., \; a_{n-1}$


Output

Print the sequence after eliminating equivalent elements in a line. Separate adjacency elements by a space character.

Example

Input

4
1 2 2 4


Output

1 2 4

### Response

```cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <cstdio>
#include <bitset>
#include <functional>
#include <tuple>
#include <list>
#include <deque>
using namespace std;
typedef pair<int, int> P;

#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;

vector<int> vec;
int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    REP(i, n) {
        int a; cin >> a;
        vec.push_back(a);
    }
    
    vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
    for(int i=0; i<vec.size(); ++i){
        if(i) cout << " ";
        cout << vec[i];
    }
    cout << endl;
	return 0;
}

```