#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int arr[] = {1, 3, 3, 3, 6};
std::sort(std::begin(arr), std::end(arr));
auto last = std::unique(std::begin(arr), std::end(arr));
for (auto it = std::begin(arr); it < last; it ++){
cout << *it << " ";
}
return 0;
}