#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int i,j,o,p;
ofstream outfile("abcd.txt");
for(i=0;i<=9;i++)
for(j=0;j<=9;j++)
for(o=0;o<=9;o++)
for(p=0;p<=9;p++)
outfile <<i<<j<<o<<p<<endl;
outfile.close();
return 0;
}