#include <iostream>
#include <string.h>
using namespace std;
int main() {
char sir[100];
cin.getline(sir, 20);
int nr = 0;
for (int i=0; i<strlen(sir); i++) {
if (strchr("A", sir[i])) nr++;
}
cout<<nr;
for (int i=0; i<strlen(sir); i++) {
if (strchr("A", sir[i])) sir[i]='*';
}
cout<<endl<<sir;
}