#include
using namespace std;
int main(){
int n;
cin>>n;
int a[10];
for(int i=0;i<n;i++){
cin>>a[i];
}
if(a[0]==9)
{
a[0]=a[0]-0;
}
for(int i=0;i<n;i++){
if(a[i]>=5){
a[i]=9-a[i];
}
}
for(int i=0;i<n;i++){
cout<<a[i];
}}
how can i change the code so that if numbef is starting from 9 it will remain 9?