#MATL, 1514 bytes
`jt]Nq$Xh2Y2bXEjXKx`jHY2KXEDT
The input needsprogram exits with an extra trailing newlineerror (this is used for marking the end of inputallowed by default).
Try it onlineTry it online
` % do...while loop
j % read a line of input
t % duplicate. Used as loop condition: if not empty proceed with next iteration
] % end loop
Nq$Xh % concatenate all strings except the first into a cell array
2Y2 % predefined literal: 'abc...z'
b % move first string to top of stack
XE % transliterate. Implicit display