#include<iostream>
#include<string>
#include <sstream>
using namespace std;
int main()
{
int arr[10] = { 5,9,8,7,0,4,3,2,1 };
for (int i = 0; i < 101; i++)
{
if (i < 10)
{
cout << arr[i % 10]<<" ";
}
else if (i == 100)
{
stringstream temp1;
temp1 << arr[i/100] << arr[i / 10 % 10] << arr[i % 10];
cout << temp1.str() << " ";
}
else
{
stringstream temp;
temp<< arr[i / 10]<< arr[i % 10];
cout << temp.str() << " ";
}
}
}