#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N >> S >> T; for(i=1;i<=N;i++) cin >> a[i]; for(i=1;i<=N;i++){ int s=S.size(),t=T.size(); int ok=0,ng=a[i]/s+1; while(ng-ok>1){ int mid=(ok+ng)/2; if((a[i]-s*mid)%t==0) ok=mid; else ng=mid; } REP(j,ok) cout << S << ' '; REP(j,(a[i]-ok*s)/t) cout << T << ' '; cout << endl; } return 0; }