#include <iostream>
using namespace std;
int main()
{
for (int i = 48; i >= 2; i--)
if (i % 5 == 0 || i % 10 == 0)
continue;
cout << i << endl;
}
return 0;