print((io.read"*a":gsub("%d",function(x)return("987654321"):sub(10-x)end)))