import java.util.Scanner;
import java.lang.Math;
import java.util.Arrays;
public class HJ009
{
public static void main(String[] args)
{
int aim,digit,pot;
int[] rs={-1,-1,-1,-1,-1,-1,-1,-1,-1};
Scanner sc;
sc=new Scanner(System.in);
aim=sc.nextInt();
digit=0;
pot=0;
for(int k=1;k<=9;k++)
{
digit=calcNum(aim,k);
//System.out.printf("digit is %d%n",digit);
if(digit==0)
break;
else
{
pot=saveArray(digit,pot,rs);
//System.out.printf("pot is %d%n",pot);
//System.out.printf("rs is %s%n",Arrays.toString(rs));
//System.out.printf("-------------%n");
}
}
printArray(rs,pot);
}
//Function:calculate current digit
private static int calcNum(int aim,int n)
{
return (aim % (int)Math.pow(10,n)) / (int)Math.pow(10,n-1);
}
//Function:save current digit into array
private static int saveArray(int digit,int pot,int[] rs)
{
int insert=1;
for(int i=1;i<=pot;i++)
{
if(rs[i-1]==digit)
{
insert=0;
break;
//cannot reach
//return pot;
}
else
;
}
if(insert==1)
{
rs[pot]=digit;
pot=pot+1;
}
else
;
return pot;
}
//Function:print rs array
private static void printArray(int[] rs,int pot)
{
for(int j=1;j<=pot;j++)
{
System.out.printf("%d",rs[j-1]);
}
}
}