#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char SZOV[1001];
int i,j;
do
{
cout<<"adjon meg maximum 1000 karakterbol allo szoveget: "<<endl;
cin.getline(SZOV,1001);
}
while(strlen(SZOV)==0);
cout<<"kodolas: al=A, fa=B"<<endl;
for(i=0;i<=strlen(SZOV);i++)
{
if(SZOV[i]=='a'&&SZOV[i+1]=='l')
{
SZOV[i]='A';
for (j=1;j<=strlen(SZOV);j++)
SZOV[i+j]=SZOV[i+1+j];
}
if(SZOV[i]=='f'&&SZOV[i+1]=='a')
{
SZOV[i]='B';
for (j=1;j<=strlen(SZOV);j++)
SZOV[i+j]=SZOV[i+1+j];
}
}
cout<<endl<<SZOV<<endl;
system("pause");
return 0;
}