Skip to main content
3 of 6
deleted 1 character in body
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372

#MATL, 15 bytes

`jt]Nq$Xh2Y2bXE

The input needs an extra trailing newline (this is used for marking the end of input).

Try 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
Luis Mendo
  • 105.3k
  • 9
  • 135
  • 372