Skip to main content
3 of 4
deleted 53 characters in body
Emigna
  • 53k
  • 5
  • 43
  • 162

05AB1E, 22 16 bytes

Saved 6 bytes thanks to Nit noticing that the seat map could be taken as a string.

DŠvDyå·Fyyl.;s]»

Try it online!

Explanation

DŠ                     # setup stack as <passengerlist>,<seatmap>,<passengerlist>
  v                    # for each passenger y
   Dyå                 # does a corresponding seat exist?
      ·F               # multiplied by 2 times do:
        yyl.;          # replace the first y with a lowercase y
             s         # and swap the seatmap and passengerlist on the stack
              ]        # end loops
               »       # join seatmap and passengerlist on newline and output
Emigna
  • 53k
  • 5
  • 43
  • 162