#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
ofstream prova;
int main()
{
string a,b="spam",c=".txt",d;
char u=48,i=48,o=48,p=48;
bool stop=false, first=true;
//48-57
int x,y=0,z;
cin>>x;
while(y<x)
{
a=u;
a+=i;
a+=o;
a+=p;
p++;
if(p>57)
{
p=48;
o++;
if(o>57)
{
o=48;
i++;
if(i>57)
{
i=48;
u++;
if(u>57)
{
if(first==true)
{
u=65;
first=false;
}
}
else if(u>90)
{
stop=true;
}
}
}
}
if(stop==false)
{
d=b+a+c;
prova.open(d.c_str(),ios::app);
prova << "lol.\n";
prova.close();
cout<<d<<endl;
y++;
}
else
{
break;
}
}
system("pause");
}