#!/bin/python

from math import sqrt, ceil
import os

def encryption(s):
    c = int(ceil(sqrt(len(s))))
    enc = ''
    for r in range(c):
        i = r
        while i < len(s):
            enc += s[i]
            i += c
        enc += ' '

    return enc

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    s = raw_input()

    result = encryption(s)

    fptr.write(result + '\n')

    fptr.close()

a9d96118a80cc463a02a4616e7f949599af022b8
<mask token>

<mask token>


def encryption(s):
    c = int(ceil(sqrt(len(s))))
    enc = ''
    for r in range(c):
        i = r
        while i < len(s):
            enc += s[i]
            i += c
        enc += ' '
    return enc


<mask token>

<mask token>


def encryption(s):
    c = int(ceil(sqrt(len(s))))
    enc = ''
    for r in range(c):
        i = r
        while i < len(s):
            enc += s[i]
            i += c
        enc += ' '
    return enc


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    s = raw_input()
    result = encryption(s)
    fptr.write(result + '\n')
    fptr.close()

from math import sqrt, ceil
import os


def encryption(s):
    c = int(ceil(sqrt(len(s))))
    enc = ''
    for r in range(c):
        i = r
        while i < len(s):
            enc += s[i]
            i += c
        enc += ' '
    return enc


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    s = raw_input()
    result = encryption(s)
    fptr.write(result + '\n')
    fptr.close()

#!/bin/python

from math import sqrt, ceil
import os

def encryption(s):
    c = int(ceil(sqrt(len(s))))
    enc = ''
    for r in range(c):
        i = r
        while i < len(s):
            enc += s[i]
            i += c
        enc += ' '

    return enc

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    s = raw_input()

    result = encryption(s)

    fptr.write(result + '\n')

    fptr.close()
