Decipher Text Encoded with Clockwise Square Technique

Published by joegal in

Mubashir Hassan recently published Clockwise Cipher. The purpose of this challenge is to take text encrypted by this technique and restore the original text.

Examples

decipher_square("Ms ussahr nHaaib") ➞ "Mubashir Hassan"

decipher_square("Eisadng  tm    i   zbia a") ➞ "Edabit is amazing"

decipher_square("acer") ➞ "acre"

Notes

  • Length of the input ciphertext is always a positive square at least four characters long.
  • The original text to be produced will never have trailing spaces.
Watch a quick demo on how Edabit works.