RT P1953
#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<cmath>
#include<ctime>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#define ll long long
using namespace std;
int cl(char a){
return a-'0';
}
string a;
string f;
string q,h;
int start;
int main(){
bool pd=false;
getline(cin,a);
int i=0;
while(a[i]>'9'||a[i]<'0'){
f[i]=a[i];
// cout <<f[i];
i++;
}
if(i){
f=a;
f.erase(i);
//cout <<f<<endl;
while(a[i]>='0'&&a[i]<='9'){
start=start*10+cl(a[i]);
i++;
}
i++;
a.erase(0,i);
//cout <<a<<endl;
//cout <<start<<endl;
int j=0;
q=a;
h=a;
while(a[j]!=' '){
j++;
}
q.erase(j);
h.erase(0,j+1);
//cout <<q<<" "<<h<<endl;
string yyy;
int len;
while(getline(cin,yyy)){
len++;
}
len--;
for(int b=start;b<=start+len;b++){
cout <<f<<b<<'.'<<q<<" "<<f<<b<<'.'<<h<<endl;
}
}else{
while(a[i]>='0'&&a[i]<='9'){
start=start*10+cl(a[i]);
i++;
}
//cout <<start<<endl;
int len=1;
string cs,qq,hh;
getline(cin,cs);
qq=cs;
hh=cs;
int qwq=0;
while(cs[qwq]>'9'||cs[qwq]<'0'){
qwq++;
}
qq.erase(qwq);
//cout <<qq<<endl;
while(cs[qwq]!=' '){
qwq++;
}
hh.erase(0,qwq+1);
//cout <<hh<<endl;
int qaq=0;
while(hh[qaq]<'0'||hh[qaq]>'9'){
qaq++;
}
hh.erase(qaq);
//cout <<hh;
while(getline(cin,cs)){
len++;
}
len--;
for(int gg=start;gg<=start+len;gg++){
cout <<qq<<gg<<" "<<hh<<gg<<endl;
}
}
return 0;
}