#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *input(size_t size){

    char *unos; int a; int sized = sizeof(*unos)*(size+=16); size_t len = 0;
    
    unos = realloc(NULL, sizeof(*unos)*size);
    
    while(EOF != (a = fgetc(stdin)) && a != '\n'){ //if its actually smth or just an end to the line
        unos[len++]=a;
        if(len == size){
            unos = realloc(unos, sized);
        }
    }
    
    unos[len++]='\0'; //end the string

    return realloc(unos, sizeof(*unos)*len); //return the new input
}

void main(){
    char *unos; char cenzura; int i;
	
    unos = input(1);
    scanf(" %c", &cenzura);
	
	int charlist[26];
	
	for(i=0; i<strlen(unos); i++){
		if(unos[i] == cenzura){
			unos[i] = '*';
		}
	}
	
	printf("%s", unos);
	
    free(unos);
}