Skip to main content
1 of 4
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221

Jelly, 32 bytes

:7+‘µ“ vibgyor”ṁṚ,Ṛjṛ/ƲƤṭ"ḶṚ⁶ẋƲY 

Try it online!

ಠ_ಠ This is overly complicated because Jelly doesn't have a centralize function...

Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221