#include <bits/stdc++.h>
using namespace std;
// this repeats the entry in set, dont know how to overcome this???
struct f{
	bool  operator()( int a, int b){
		return a<b;
	}
};
int main() {
	set<int,f> s;
	s.insert(2);
	s.insert(1);
	s.insert(3);
	s.insert(2);
	cout<<s.size()<<"\n";
	for(auto x: s) cout<<x<<" ";
}