program grsd; var q,w,e,m,n,b,s,i,j,k:integer; begin readln(s); readln(m,n,b); if (m>0) and (n>0) and (b>0) then for i:=1 to m do for j:=1 to n do for k:=1 to b do if i+j+k=s then begin writeln(i,j,k); for q:=1 to i do write('litak '); for w :=1 to j do write('car '); for e:=1 to k do write('train '); if (m>0) and (n>0) and (b=0) then for i:=1 to m do for j:=1 to n do if i+j=s then begin writeln(i,j); for q:=1 to i do write('litak'); for w:=1 to j do write('car'); end; end; end.