#include <iostream>
using namespace std;
int main(){
int numar, i;
cout << "introdu numarul:" << endl;
cin >> numar;
for(i=0; i<10; i++){
int val = numar;
while(val>0){
int cifra = val%10;
val /= 10;
if(i == cifra){
cout << cifra;
break;
}
}
}
cout << endl;
}