#include <bits/stdc++.h>
#define LL long long
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(int i=0;i<n;i++)
#define REV(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define pri(a) cout<<a<<endl
#define prii(a,b) cout<<a<<" "<<b<<endl
#define priii(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define WRITE(fn) freopen(fn, "w", stdout);
#define hi printf("Hello World\n");
using namespace std;
/***/ int cs = 0;
const int INF = 1<<29;
const int MX = 1e5+10;
int main()
{
int n;
string sa[] = {"Happy", "birthday", "to", "you", "Happy", "birthday", "to", "you", "Happy", "birthday", "to", "Rujia", "Happy", "birthday", "to", "you" };
string sb[12345];
while(cin>>n)
{
if(n<=16)
{
REP(i,n)
{
cin>>sb[i];
}
int j = 0;
REP(i,16)
{
cout << sb[j++] << ": " << sa[i] <<"\n";
if(j==n) j=0;
}
}
else
{
REP(i,n)
{
cin>>sb[i];
}
int j = 0, i = 0, idx = 0;
for( ; ; )
{
idx++;
cout << sb[i++] << ": " << sa[j++] <<"\n";
if(j==16) j=0;
if(i==n) i=0;
if(idx>=(n-1) and idx%16==0) break;
}
}
}
return 0;
}
No comments:
Post a Comment