#include<iostream.h> int verif(long n, int a) { while(n) { if(n%10>a) return 0; n=n/10; } return 1; } void main() { long n; int b; cin>>n; for(b=2;b<=10;b++) if(verif(n,b-1)==0) cout<<b<<" "; }