C, 209 203203 137 bytes
-66 bytes thanks to ceilingcat
mainchar a[9];main(b,c,f){c=b=0;char a[99]={0};getsgets(a);f=strlen(a)-3;a[f+1]=0;if3;a[f+1]=0;printf(a[f]==98||(*a==48&&!f))b=1;if(*a=='-'&&a[1]==49&&f==1)*a==55&a[1]==49&f==1?a[1]=98,b=1;if(*a==49&&:*a==49&!f)?*a=98,b=1;if(b:a[f]==98|*a==48&!f){printf(?"%s",a);return;}printf(:"%sb",a);}