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