#include
using namespace std;
int main()
{
for (int a=1;a<=9;a++)<br> {
for (int b=1;b<=9;b++)</span>
{
for (int c=1;c<=9;c++)<br> {
for (int d=1;d<=9;d++)</span>
{
if (((a==5) & (b==5)) || ((a==5)&(c==5)) || ((a==5)&(d==5)) || ((b==5)&(c==5)) || ((b==5)&(d==5)) || ((c==5)&(d==5))) cout<<a<<b<<c<<d<<endl;</span>
}
}
}
}
return 0;
}