Chewbacca and Number

#include
#include
using namespace std;
int main()
{
string str;
cin>>str;
for(int i=0;i<str.size();i++)
{
if(str[i]>=53&&str[i]<57)
{
int n=str[i]-52;
str[i]=53-n;;
}
}
cout<<str;
return 0;
}

I am getting wrong answer for test case 4 only, cannot figure out where I might be going wrong…any help?