#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
int main()
{ char char s[201];
int i;
ifstream in("prosir.in");
ofstream out("prosir.out");
in.get(s,201);
for(i=1;s[i];i++)
if(s[i]==' ' and isalpha(s[i-1]))
s[i-1]='5';
s[strlen(s)-2]='5';
cout<<s;
return 0;
}
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
int main()
{ char char s[201],s1[201],*p;
int i;
ifstream in("prosir.in");
ofstream out("prosir.out");
in.get(s,201);
p=strtok(s," ");
while(p)
{p[strlen(p)-1]='5';
strcat(s1,p);
strcat(s1," ");
p=strtok(NULL," ");
}
cout<<s1;
return 0;
}