#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
//#define LOCAL
using namespace std;
typedef long long ll;
const int mx=1e3+10;
vector<ll>num;

int main() {
#ifdef LOCAL
ifstream fin("1.txt");
streambuf*p;
p=cin.rdbuf(fin.rdbuf());
#endif // LOCAL
ll n;
cin>>n;
for(ll i=0;i<n;i++){
    ll value;
    cin>>value;
    num.push_back(value);
}
vector<ll>::iterator it1=num.begin(), it2=num.end(), it3;
it3=unique(it1, it2);
ll len=num.size();
for(vector<ll>::iterator t=num.begin();t!=it3;t++){
    if(num.begin()==t) printf("%lld", *t);
    else printf(" %lld", *t);
}
puts("");


#ifdef LOCAL
fin.close();
#endif // LOCAL
}



### 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 <fstream>
#include <algorithm>
#include <vector>
//#define LOCAL
using namespace std;
typedef long long ll;
const int mx=1e3+10;
vector<ll>num;

int main() {
#ifdef LOCAL
ifstream fin("1.txt");
streambuf*p;
p=cin.rdbuf(fin.rdbuf());
#endif // LOCAL
ll n;
cin>>n;
for(ll i=0;i<n;i++){
    ll value;
    cin>>value;
    num.push_back(value);
}
vector<ll>::iterator it1=num.begin(), it2=num.end(), it3;
it3=unique(it1, it2);
ll len=num.size();
for(vector<ll>::iterator t=num.begin();t!=it3;t++){
    if(num.begin()==t) printf("%lld", *t);
    else printf(" %lld", *t);
}
puts("");


#ifdef LOCAL
fin.close();
#endif // LOCAL
}



```