Skip to main content
5 of 6
added 73 characters in body
Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25

Python 3, 62 47 57 bytes

Edit: - 5 bytes thanks to @Mr.Xcoder

Edit: +10 bytes to fix a bug

lambda x,y:({*"abc"}-{x[:1],y[:1]}).pop()+(x[1:]or y[1:])

Try it online!

Halvard Hummel
  • 3.2k
  • 1
  • 11
  • 25