#include <stdio.h>
#include <stdlib.h>
#include<string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define N 405
int main(int argc, char *argv[]) {
char C[N];
char AL[N]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int i=0,a[N],j=0,h=0,s=0;
memset(a,0,sizeof(a));
while(scanf("%c",C[i++])!=EOF){
if(C[i]!=' '||C[i]!='.'||C[i]!='!'||C[i]!='\n'){
a[C[i]-'A']=a[C[i]-'A']+1;
}
else
{
i++;
}
}
for(i=0;i<26;i++){
for(j=25;j>=0;j--){
if(j==25){
printf("%c",AL[s++]);
printf(" ");
h=C[s]-'A';
if(a[h]!=0){
printf("*");
printf(" ");
}
}
}
}
return 0;
}