At many competitions that have a word «cup» in its official name the winner is presented with an actual cup. This time the organizers of one unusual programming competition have decided to please the winner even more and to add a nameplate to the cup with the handle of the winner.

The nameplate is to be rectangular and the text on it will be printed as a table of several rows and columns. Having some measurements done, the organizers have found out that the number a of rows cannot be greater than 5 while the number b of columns cannot exceed 20. Every cell of the table will contain either an asterisk («*») or a letter of user's handle.

Furthermore, the organizers want the rows of the table to be uniform, which means that the number of asterisks used in different rows should differ by at most one (i.e. you can't have two asterisks in the first row and none in the second). The main goal, however, is to obtain the winner's handle precisely when reading the table from top to bottom and from left to right in every row (skipping asterisks).

The organizers want for the nameplate to have as few rows as possible and among all valid tables with the minimum number of rows they want to choose the one that has the minimum number of columns.

The winner is not yet determined so your task is to write a program that, given a certain handle, generates the necessary table.

Input

The only line contains one string s (1 ≤ |s| ≤ 100), comprised of uppercase and lowercase Latin letters, — the handle of the winner.

Output

In the first line output the minimum number a of rows in the table and the minimum number b of columns in an optimal table with rows.

The following a lines should contain b characters each — any valid table.

Examples

Input


tourist


Output


1 7
tourist


Input


MyNameIsLifeIAmForeverByYourSideMyNameIsLife


Output


3 15
MyNameIsLifeIAm
ForeverByYourSi
deMyNameIsL*ife

Source: codeforces | Difficulty: EASY


Solutions:
def print2d(a):
	for i in range(len(a)):
		print(''.join(list(map(str, a[i]))))
st = input()
for i in range(1, 5 + 1):
	vst = len(st) // i
	ost = len(st) % i
	if vst + min(ost, 1) > 20:
		continue
	a = [0] * i
	ind = 0
	f = 0
	for j in range(len(a)):
		a[j] = []
	for j in range(len(a)):
		for k in range(vst):
			a[j].append(st[ind])
			ind += 1
		if ost > 0:
			ost -= 1
			a[j].append(st[ind])
			ind += 1
			f = 1
		elif f != 0:
			a[j].append('*')
	if a[-1][-1] == '*' or a[-1][-1] == st[-1]:
		print(len(a), len(a[0]))
		print2d(a)
		exit()


from math import *
w = input()
p = len(w)
q = ceil(p / 20)
t = ceil(p / q)
z = q * t - len(w)
e = z // t
l = z % t
print(q, t)
for i in range(q):
	g = e + (l > 0)
	l -= 1
	print('*' * g + w[:t - g])
	w = w[t - g:]


s = input()
n = len(s)
ost = 1000
d = 0
sh = 0
b = True
for i in range(1, 6):
	for j in range(1, 21):
		if n <= i * j and b:
			d = i
			sh = j
			ost = n % (i * j)
			b = False
c = 0
if ost != 0:
	f = abs(n - d * sh)
	z = f
else:
	f = 0
print(d, sh)
for i in range(d):
	if f > 0:
		if i % z != 0:
			k = 20 - sh + 1
			print((s[c:c + sh - 1] + k * '*')[:sh])
			c += sh - 1
		else:
			print((s[c:c + sh] + 20 * '*')[:sh])
			c += sh
			f -= 1
	else:
		k = 20 - sh
		print((s[c:c + sh] + '*' * 20)[:sh])
		c += sh


import math
handle = input()
length = len(handle)
if length == 1:
	print('1 1')
	print(handle)
	exit()
(rows, columns) = (0, 0)
for i in range(1, 6):
	if length / i <= 20:
		rows = i
		columns = math.ceil(length / i)
		break
numberOfStars = abs(length - rows * columns)
starsAdded = 0
print(rows, columns)
for i in range(rows):
	for j in range(columns - 1):
		print(handle[j + columns * i - starsAdded], end='')
	if numberOfStars > 0:
		print('*')
		starsAdded = starsAdded + 1
		numberOfStars = numberOfStars - 1
	else:
		print(handle[j + columns * i - starsAdded + 1])


hand = input()
a = (len(hand) - 1) // 20 + 1
b = (len(hand) - 1) // a + 1
bad = a * b - len(hand)
ans = [[0] * b for i in range(a)]
for i in range(bad):
	ans[i][0] = '*'
I = 0
for i in range(a):
	for j in range(b):
		if ans[i][j] == '*':
			continue
		ans[i][j] = hand[I]
		I += 1
print(a, b)
for i in ans:
	print(*i, sep='')


import math
line = input()
rw = math.ceil(len(line) / 20)
cl = math.ceil(len(line) / rw)
ss = rw * cl - len(line)
print(rw, cl)
c = 0
for i in range(rw):
	r = 1 if ss > 0 else 0
	s = '*' * r
	l = cl - len(s)
	print(s + line[c:c + l])
	if ss > 0:
		ss -= 1
	c += l


s = input()
l = len(s)
ansx = 100
ansy = 100
for x in range(1, 21):
	for y in range(1, 6):
		if (x - len(s) % x <= y or len(s) % x == 0) and x * y >= len(s):
			if ansy > y:
				ansy = y
				ansx = x
			if ansy == y and ansx > x:
				ansx = x
print(ansy, ansx)
k = ansx * ansy - l
for i in range(ansy):
	if k > 0:
		k -= 1
		tmp = s[:min(ansx, len(s)) - 1]
		print(tmp + '*')
		s = s[min(ansx, len(s)) - 1:]
	else:
		tmp = s[:min(ansx, len(s))]
		print(tmp)
		s = s[min(ansx, len(s)):]


s = input()
lenS = len(s)
row = lenS // 20
if lenS - row * 20 > 0:
	row += 1
col = lenS // row
numAst = 0
if lenS % col != 0:
	numAst = row - lenS % col
	col += 1
print('%d %d' % (row, col))
numAstPR = 0
numAstRem = numAst
if numAst > row:
	numAstPR = numAstRem // row
	numAstRem -= numAstPR * row
curIndex = 0
for _ in range(row):
	if row - _ <= numAstRem:
		numAstPR += 1
		numAstRem = -1
	print('*' * numAstPR, end='')
	print(s[curIndex:curIndex + col - numAstPR])
	curIndex += col - numAstPR


s = input()
strok = (len(s) + 19) // 20
stolb = (len(s) + strok - 1) // strok
print(strok, stolb)
if len(s) % strok != 0:
	zv = strok * stolb - len(s)
	for i in range(strok):
		if zv != 0:
			print(s[:stolb - 1] + '*')
			s = s[stolb - 1:]
			zv -= 1
		else:
			print(s[:stolb])
			s = s[stolb:]
else:
	for i in range(strok):
		print(s[:stolb])
		s = s[stolb:]


s = input()
a = (len(s) + 19) // 20
b = (len(s) + a - 1) // a
print(a, b)
z = a * b - len(s)
c = 0
for i in range(a):
	d = (z + a - 1) // a
	print(s[c:c + b - d], '*' * ((z + a - 1) // a), sep='')
	c += b - (z + a - 1) // a
	z -= d


s = input()
k = len(s)
if k % 20 == 0:
	print(k // 20, 20)
	for i in range(0, k - 19, 20):
		print(s[i:i + 20])
elif k < 20:
	print(1, k)
	print(s)
elif k < 40:
	if k % 2 != 0:
		s += '*'
		k += 1
	print(2, k // 2)
	print(s[0:k // 2])
	print(s[k // 2:])
elif k < 60:
	if k % 3 == 1:
		k += 2
		s = s[:k // 3 - 1] + '*' + s[k // 3 - 1:2 * k // 3 - 1] + '*' + s[2 * k // 3 - 1:]
	elif k % 3 == 2:
		k += 1
		s += '*'
	print(3, k // 3)
	print(s[:k // 3])
	print(s[k // 3:2 * k // 3])
	print(s[2 * k // 3:])
elif k < 80:
	if k % 4 == 1:
		k += 3
		s = s[:k // 4 - 1] + '*' + s[k // 4 - 1:2 * k // 4 - 1] + '*' + s[2 * k // 4 - 1:3 * k // 4 - 1] + '*' + s[3 * k // 4 - 1:]
	elif k % 4 == 2:
		k += 2
		s = s[:k // 4 - 1] + '*' + s[k // 4 - 1:2 * k // 4 - 1] + '*' + s[2 * k // 4 - 1:3 * k // 4] + s[3 * k // 4:]
	elif k % 4 == 3:
		k += 1
		s += '*'
	print(4, k // 4)
	print(s[:k // 4])
	print(s[k // 4:2 * k // 4])
	print(s[2 * k // 4:3 * k // 4])
	print(s[3 * k // 4:])
elif k < 100:
	if k % 5 == 1:
		k += 4
		s = s[:k // 4 - 1] + '*' + s[k // 4 - 1:2 * k // 4 - 1] + '*' + s[2 * k // 4 - 1:3 * k // 4 - 1] + '*' + s[3 * k // 4 - 1:] + '*'
	elif k % 5 == 2:
		k += 3
		s = s = s[:k // 5 - 1] + '*' + s[k // 5 - 1:2 * k // 5 - 1] + '*' + s[2 * k // 5 - 1:3 * k // 5 - 1] + '*' + s[3 * k // 5 - 1:]
	elif k % 5 == 3:
		k += 2
		s += '*'
		s = '*' + s
	elif k % 5 == 4:
		k += 1
		s += '*'
	print(5, k // 5)
	print(s[:k // 5])
	print(s[k // 5:2 * k // 5])
	print(s[2 * k // 5:3 * k // 5])
	print(s[3 * k // 5:4 * k // 5])
	print(s[4 * k // 5:])


s = input()
a = (len(s) - 1) // 20 + 1
b = (len(s) - 1) // a + 1
count = a * b - len(s)
ans = [[0 for j in range(b)] for i in range(a)]
for i in range(count % a):
	for j in range(count // a + 1):
		ans[i][j] = '*'
for q in range(count % a, a):
	for j in range(count // a):
		ans[q][j] = '*'
now = 0
for i in range(a):
	for j in range(b):
		if ans[i][j] != '*':
			ans[i][j] = s[now]
			now += 1
print(a, b)
for i in ans:
	print(*i, sep='')


import sys
s = input()
x = 10000
y = 100000
for i in range(1, 6):
	d = len(s) // i
	os = len(s) % i
	a = [d] * i
	for i in range(os):
		a[i] += 1
	if max(a) <= 20:
		ss = 0
		print(len(a), max(a))
		for i in a:
			print(s[ss:ss + i] + (max(a) - i) * '*')
			ss += i
		sys.exit()


s = input()
n = len(s)
if n > 20:
	for cols in range(20, 0, -1):
		for rows in range(1, 6):
			p = cols * rows
			if p >= n:
				(per_row, left) = divmod(p - n, rows)
				cols -= per_row
				print(rows, cols)
				x = 0
				for row in range(rows):
					if row < left:
						l = cols - 1
						addend = '*'
					else:
						l = cols
						addend = ''
					nxt = s[x:x + l]
					x = x + l
					print(addend + nxt)
				exit()
else:
	print(1, n)
	print(s)


import math
s = input()
a = 5
b = 20
n_lines = math.ceil(len(s) / b)
n_columns = math.ceil(len(s) / n_lines)
n_stars = n_columns * n_lines - len(s)
stars = [0 for i in range(n_lines)]
pos = 0
for i in range(n_stars):
	stars[pos] += 1
	pos += 1
	if pos >= n_lines:
		pos = 0
print(n_lines, n_columns)
pos = 0
pos_end = 0
for i in range(n_lines):
	s_len = n_columns - stars[i]
	print(s[pos:pos + s_len] + '*' * stars[i])
	pos += s_len


import math
word = input()
n = len(word)
strok = math.ceil(n / 20)
min_st = n // strok
max_st = math.ceil(n / strok)
s = word
print(strok, max_st)
for i in range(n % strok):
	print(s[:max_st])
	s = s[max_st:]
for i in range(strok - n % strok):
	print(s[:min_st] + int(min_st != max_st) * '*')
	s = s[min_st:]


from math import ceil
s = input()
n = len(s)
y = ceil(n / 20)
x = ceil(n / y)
print(y, x)
need = x * y - n
place = [need // y] * y
placeam = need // y * y
for i in range(y):
	if placeam == need:
		break
	place[i] += 1
	placeam += 1
for i in range(y):
	print(s[:x - place[i]] + '*' * place[i])
	s = s[x - place[i]:]


import math as m
name = input()
nameLen = len(name)
maxX = 20
maxY = 5
minHeight = int(m.ceil(nameLen / maxX))
minWidth = int(m.ceil(nameLen / minHeight))
stars = minHeight * minWidth - nameLen
plate = ''
pos = 0
for i in range(minHeight):
	if stars > 0:
		plate += '*'
		stars -= 1
		plate += name[pos:pos + minWidth - 1]
		pos += minWidth - 1
	else:
		plate += name[pos:pos + minWidth]
		pos += minWidth
	plate += '\n'
plate = plate[:-1]
print(minHeight, minWidth)
print(plate)


s = input()
if len(s) % 20 == 0:
	ns = len(s) // 20
else:
	ns = len(s) // 20 + 1
if len(s) % ns == 0:
	np = len(s) // ns
else:
	np = len(s) // ns + 1
n = ns * np - len(s)
i = 0
q = 1
print(ns, np)
while i < len(s):
	if q <= n % np:
		for g in range(np - n // np - 1):
			print(s[i], end='')
			i += 1
		for g in range(n // np + 1):
			print('*', end='')
		print()
	else:
		for g in range(np - n // np):
			print(s[i], end='')
			i += 1
		for g in range(n // np):
			print('*', end='')
		print()
	q += 1


import math
ln = input()
rows = math.ceil(len(ln) / 20)
cols = math.ceil(len(ln) / rows)
stars = rows * cols - len(ln)
print(rows, cols)
c = 0
for i in range(rows):
	r = 1 if stars > 0 else 0
	s = '*' * r
	l = cols - len(s)
	print(s + ln[c:c + l])
	if stars > 0:
		stars -= 1
	c += l


def pr(line, num):
	if len(line) != num:
		print(line + '*')
	else:
		print(line)
a = input()
m = (len(a) - 1) // 20 + 1
n = (len(a) + m - 1) // m
print(m, n)
x = (len(a) - 1) // 20 + 1
for i in range(x):
	pr(a[:(len(a) + m - 1) // m], n)
	a = a[(len(a) + m - 1) // m:]
	m = (len(a) - 1) // 20 + 1


st = input()
ln = len(st)
a = (ln + 19) // 20
b = (ln + a - 1) // a
print(a, b)
stars = (a * b - ln) // a
dops = (a * b - ln) % a
teck = 0
for i in st:
	print(i, end='')
	teck += 1
	if dops > 0:
		if teck == b - stars - 1:
			print('*' * (stars + 1))
			dops -= 1
			teck = 0
	elif teck == b - stars:
		print('*' * stars)
		teck = 0


import math
s = input()
a = math.ceil(len(s) / 20)
b = math.ceil(len(s) / a)
count = a * b - len(s)
print(a, b)
for i in range(a):
	if count != 0:
		print('*' + s[:b - 1])
		s = s[b - 1:]
		count -= 1
	else:
		print(s[:b])
		s = s[b:]


s = list(input())
a = []
n = len(s)
for i in range(1, 6):
	if n / i == int(n / i) and n // i <= 20:
		su = 0
		print(i, n // i)
		for ii in range(i):
			print(''.join(s[su:su + n // i]))
			su += n // i
		exit()
	else:
		l = int(n / i) + 1
		n2 = l - (n - (i - 1) * l)
		if n2 <= n ** 2 and l <= 20:
			x = n2 // i
			y = n2 % i
			su = 0
			print(i, l)
			for ii in range(i):
				if y > 0:
					print('*' * (1 + x) + ''.join(s[su:su + l - x - 1]))
					y -= 1
					su += l - x - 1
				else:
					print('*' * x + ''.join(s[su:su + l - x]))
					su += l - x
			exit()


from math import ceil
s = input()
n = len(s)
b = 20
if n <= 20:
	print(1, n)
	print(s)
else:
	while b > 0:
		if n % b == 0:
			print(n // b, b)
			while len(s) > 0:
				print(s[:b])
				s = s[b:]
			break
		else:
			a = ceil(n / b)
			k = b - n % b
			if k < a:
				print(a, b)
				if n >= b:
					while k > 0:
						print(s[:b - 1] + '*')
						s = s[b - 1:]
						k -= 1
					while len(s) > 0:
						print(s[:b])
						s = s[b:]
				else:
					print(s)
				break
			else:
				b -= 1


import math
s = input()
if len(s) <= 20:
	print(1, len(s))
	print(s)
else:
	n = len(s)
	z = 0
	min_kolv_strock = 100000000
	min_kolv_svezd = -1
	while n <= 100:
		ok = False
		D = -1
		for q in range(2, n):
			if n % q == 0 and q <= 5 and (n // q <= 20):
				ok = True
				D = q
				break
		if ok:
			if min_kolv_strock > D:
				min_kolv_strock = D
				min_kolv_svezd = z
		z += 1
		n += 1
	D = min_kolv_strock
	kol_zvezd_str = math.ceil(min_kolv_svezd / D)
	n = len(s) + min_kolv_svezd
	z = min_kolv_svezd
	kol_stlb = n // D
	print(D, n // D)
	kol_zvezd_str = math.ceil(z / D)
	mistake = 0
	for i in range(D):
		if z >= kol_zvezd_str:
			print(s[i * kol_stlb - mistake:(i + 1) * kol_stlb - kol_zvezd_str - mistake] + '*' * kol_zvezd_str)
			z -= kol_zvezd_str
			mistake += kol_zvezd_str
		elif z > 0:
			print(s[i * kol_stlb - mistake:(i + 1) * kol_stlb - z - mistake] + '*' * z)
			mistake += z
		else:
			print(s[i * kol_stlb - mistake:(i + 1) * kol_stlb - mistake])


s = input()
if len(s) <= 20:
	print(1, len(s))
	print(s)
elif len(s) % 20 == 0:
	print(len(s) // 20, 20)
	i = 0
	while i < len(s):
		print(s[i:i + 20])
		i += 20
else:
	ms = len(s) // 20 + 1
	c = abs(len(s) - (len(s) // ms + 1) * ms)
	if len(s) % ms == 0:
		c = 0
		print(ms, len(s) // ms)
		i = 0
		while i < len(s):
			print(s[i:i + len(s) // ms])
			i += len(s) // ms
	else:
		mc = c // ms - (ms - 2)
		if c % ms == 0:
			mc = c // ms
		stay = False
		if c < ms:
			mc = 1
			stay = True
		print(ms, len(s) // ms + 1)
		i = 0
		while mc < 1:
			print(s[i:i + len(s) // ms + 1])
			if c % ms != 0:
				mc += 1
			i += len(s) // ms + 1
		while i < len(s):
			print(s[i:i + len(s) // ms + 1 - mc], '*' * mc, sep='')
			i += len(s) // ms + 1 - mc
			if c % ms != 0 and stay == False:
				mc += 1
			if stay == True and mc * (i // 20 + 1) >= c:
				mc = 0


s = input().rstrip()
n = len(s)
if n <= 20:
	print(1, n)
	print(s)
	exit(0)
res = (1000, 1000)
for rows in range(1, 6):
	cols = 0
	while rows * cols + rows <= n:
		cols += 1
	rem = n - rows * cols
	if rem == 0 and cols <= 20:
		print(rows, cols)
		for i in range(rows - 1):
			print(s[i * cols:i * cols + cols])
		print(s[(rows - 1) * cols:] + '*' * rem)
		break
	if cols <= 19:
		print(rows, cols + 1)
		cols += 1
		for i in range(rem):
			print(s[i * cols:i * cols + cols])
		cols -= 1
		for i in range(rem, rows):
			print(s[i * cols + rem:i * cols + cols + rem] + '*')
		break


s = input()
n = len(s)
if n % 20 == 0:
	k_str = n // 20
else:
	k_str = n // 20 + 1
a = k_str * [n // k_str]
in_each = n // k_str
if n % k_str == 0:
	in_str = n // k_str
	dop = 0
else:
	in_str = n // k_str + 1
	dop = n % k_str
for i in range(dop):
	a[i] += 1
cur = 0
print(k_str, in_str)
for i in range(k_str):
	print(s[cur:cur + a[i]], end='')
	cur += a[i]
	print('*' * (in_str - a[i]))


s = input()
length = len(s)
d = []
for i in range(1, 6):
	for j in range(1, 21):
		if i * j >= length:
			d.append([i, j])
			break
length = d[0]
print(length[0], length[1])
diff = length[0] * length[1] - len(s)
for i in range(diff):
	s = s[:i * length[1]] + '*' + s[i * length[1]:]
for i in range(length[0]):
	print(s[i * length[1]:(i + 1) * length[1]])


s = input()
check = False
for i in range(1, 6):
	for j in range(1, 21):
		if i * j >= len(s):
			print(i, j)
			check = True
			m = (i * j - len(s)) // i
			n = (i * j - len(s)) % i
			itr = -1
			for k in range(i):
				for p in range(j):
					if n > 0:
						if p < j - m - 1:
							itr += 1
							print(s[itr], end='')
						else:
							print('*', end='')
					elif p < j - m:
						itr += 1
						print(s[itr], end='')
					else:
						print('*', end='')
				n -= 1
				print()
			break
	if check is True:
		break


name = input()
l = len(name)
p = (l + 19) // 20
q = (l + p - 1) // p
a = p * q - l
for x in range(a):
	name = name[:x * q] + '*' + name[x * q:]
print(p, q)
print(*[name[i:i + q] for i in range(0, p * q, q)], sep='\n')


s = input()
e = len(s)
if e <= 20:
	print(1, e)
	print(s)
elif e <= 40:
	if e % 2 == 0:
		print(2, e // 2)
		print(s[0:e // 2])
		print(s[e // 2:e])
	else:
		print(2, e // 2 + 1)
		print(s[0:e // 2] + '*')
		print(s[e // 2:e])
elif e <= 60:
	if e % 3 == 0:
		print(3, e // 3)
		print(s[0:e // 3])
		print(s[e // 3:2 * e // 3])
		print(s[2 * e // 3:e])
	elif e % 3 == 1:
		print(3, e // 3 + 1)
		print(s[0:e // 3] + '*')
		print(s[e // 3:2 * e // 3] + '*')
		print(s[2 * e // 3:e])
	else:
		print(3, e // 3 + 1)
		print(s[0:e // 3] + '*')
		print(s[e // 3:2 * e // 3])
		print(s[2 * e // 3:e])
elif e <= 80:
	if e % 4 == 0:
		print(4, e // 4)
		print(s[0:e // 4])
		print(s[e // 4:e // 2])
		print(s[e // 2:3 * e // 4])
		print(s[3 * e // 4:e])
	elif e % 4 == 1:
		print(4, e // 4 + 1)
		print(s[0:e // 4] + '*')
		print(s[e // 4:e // 2] + '*')
		print(s[e // 2:3 * e // 4] + '*')
		print(s[3 * e // 4:e])
	elif e % 4 == 2:
		print(4, e // 4 + 1)
		print(s[0:e // 4] + '*')
		print(s[e // 4:e // 2])
		print(s[e // 2:3 * e // 4] + '*')
		print(s[3 * e // 4:e])
	else:
		print(4, e // 4 + 1)
		print(s[0:e // 4] + '*')
		print(s[e // 4:e // 2])
		print(s[e // 2:3 * e // 4])
		print(s[3 * e // 4:e])
elif e % 5 == 0:
	print(5, e // 5)
	print(s[0:e // 5])
	print(s[e // 5:2 * e // 5])
	print(s[2 * e // 5:3 * e // 5])
	print(s[3 * e // 5:4 * e // 5])
	print(s[4 * e // 5:e])
elif e % 5 == 1:
	print(5, e // 5 + 1)
	print(s[0:e // 5] + '*')
	print(s[e // 5:2 * e // 5] + '*')
	print(s[2 * e // 5:3 * e // 5] + '*')
	print(s[3 * e // 5:4 * e // 5] + '*')
	print(s[4 * e // 5:e])
elif e % 5 == 2:
	print(5, e // 5 + 1)
	print(s[0:e // 5] + '*')
	print(s[e // 5:2 * e // 5] + '*')
	print(s[2 * e // 5:3 * e // 5])
	print(s[3 * e // 5:4 * e // 5] + '*')
	print(s[4 * e // 5:e])
elif e % 5 == 3:
	print(5, e // 5 + 1)
	print(s[0:e // 5] + '*')
	print(s[e // 5:2 * e // 5])
	print(s[2 * e // 5:3 * e // 5] + '*')
	print(s[3 * e // 5:4 * e // 5])
	print(s[4 * e // 5:e])
else:
	print(5, e // 5 + 1)
	print(s[0:e // 5] + '*')
	print(s[e // 5:2 * e // 5])
	print(s[2 * e // 5:3 * e // 5])
	print(s[3 * e // 5:4 * e // 5])
	print(s[4 * e // 5:e])


s = input()
l = len(s)
a = (l - 1) // 20 + 1
b = (l - 1) // a + 1
print(a, b)
t = a * b - l
ans = [[''] * b for i in range(a)]
flag = False
k = 0
for i in range(a):
	if t > 0:
		flag = True
		t -= 1
	for j in range(b):
		if flag == True:
			ans[i][j] = '*'
			flag = False
		else:
			ans[i][j] = s[k]
			k += 1
for i in range(a):
	print(''.join(map(str, ans[i])))


s = input()
n = len(s)
min_val = (n + 19) // 20
l = (n + min_val - 1) // min_val
k = min_val - (l * min_val - n)
print(min_val, l)
ind = 0
for x in range(min_val):
	if k > 0:
		for y in range(ind, ind + l):
			print(s[y], end='')
		print('\n', end='')
		k -= 1
		ind = ind + l
	else:
		for y in range(ind, ind + l - 1):
			print(s[y], end='')
		print('*', end=' ')
		print('\n', end='')
		ind = ind + l - 1


name = input()
x = 0
for i in range(1, 6):
	if len(name) / i <= 20:
		x = i
		break
y = (len(name) - 1) // x + 1
a = x * y - len(name)
print(x, y)
for i in range(a):
	print(name[i * (y - 1):(i + 1) * (y - 1)] + '*')
for j in range(x - a):
	print(name[a * (y - 1) + j * y:a * (y - 1) + (j + 1) * y])


s = input()
n = len(s)
for i in range(1, 6):
	if n <= i * 20:
		m = n // i + (1 if n % i else 0)
		ans = [None] * i
		if n % i == 0:
			for k in range(i):
				ans[k] = s[k * m:(k + 1) * m]
		else:
			for k in range(n % i):
				ans[k] = s[k * m:(k + 1) * m]
			l = n % i * m
			for k in range(n % i, i):
				ans[k] = s[l:l + m - 1] + '*'
				l += m - 1
		print(i, m)
		for k in range(i):
			print(ans[k])
		break


text = input()
(a, b) = (5, 20)
length = len(text)
lens = (length + 19) // b
if lens == 1:
	print(1, length)
	print(text)
else:
	m = 0
	for i in range(1, length):
		m += 1
	m = m // lens + 1
	print(lens, m)
	zv = m * lens - length
	q = []
	d = list(text)
	for i in range(zv):
		d.insert(i * m, '*')
	d = ''.join(d)
	for i in range(lens):
		print(d[i * m:(i + 1) * m])


S = input()
for i in range(6):
	for j in range(21):
		if i * j < len(S):
			continue
		a = i * j - len(S)
		b = a % i
		c = a // i
		print(str(i) + ' ' + str(j))
		(summary, index, cnt) = (0, 0, 0)
		for l in range(i):
			if b:
				print('*', end='')
				b -= 1
				cnt += 1
			for k in range(c):
				print('*', end='')
				cnt += 1
			while cnt < j:
				print(S[index], end='')
				index += 1
				cnt += 1
			print(' ')
			cnt = 0
		exit(0)


s = input()
n = len(s)
for i in range(1, 6):
	if (n + i - 1) // i <= 20:
		sim = n // i
		kol = (i - n % i) % i
		res = []
		j = 0
		print(i, (n + i - 1) // i)
		for j in range(kol):
			res.append(s[j * sim:j * sim + sim] + '*')
		j = kol * sim
		sim = (n + i - 1) // i
		for j in range(j, n, sim):
			res.append(s[j:j + sim])
		for rt in res:
			print(rt)
		exit(0)


from math import ceil
a = input()
ln = len(a)
for i in range(1, 6):
	if ln / i <= 20:
		print(i, ceil(ln / i))
		if ln % i == 0:
			cnt = ln
			while cnt > 0:
				print(a[ln - cnt:ln - cnt + ln // i])
				cnt -= ln // i
		else:
			cnt = ln
			amt = (i - ln % i) % i
			while cnt > 0:
				if cnt % ceil(ln / i) == 0:
					print(a[ln - cnt:ln - cnt + ln // i + 1])
					cnt -= ln // i + 1
				elif amt != 0:
					amt -= 1
					print(a[ln - cnt:ln - cnt + ln // i] + '*')
					cnt -= ln // i
		break


from math import *
s = input()
close = False
for a in range(1, 6):
	for b in range(1, 21):
		if len(s) > a * b:
			continue
		zvez = [0] * a
		if len(s) % b == 0:
			zvez[-1] = 0
		else:
			zvez[-1] = b - len(s) % b
		cor = zvez[-1] <= 1
		while not cor:
			mi = zvez.index(min(zvez))
			ma = zvez.index(max(zvez))
			zvez[mi] += 1
			zvez[ma] -= 1
			cor = True
			for ind in zvez:
				if abs(ind - min(zvez)) >= 2:
					cor = False
		close = True
		print(a, b)
		for ind in range(a):
			kol = b - zvez[ind]
			print(zvez[ind] * '*', end='')
			while kol != 0:
				print(s[0], end='')
				s = s[1:]
				kol -= 1
			print()
		break
	if close:
		break


s = input()
n = len(s)
if n < 21:
	print(1, n, sep=' ')
	print(s)
elif n % 20 == 0:
	print(n // 20, 20, sep=' ')
	for i in range(1, n // 20 + 1):
		print(s[(i - 1) * 20:i * 20])
else:
	k = n // 20 + 1
	if n % k == 0:
		print(k, n // k, sep=' ')
		for i in range(1, k + 1):
			print(s[(i - 1) * (n // k):i * (n // k)])
	else:
		print(k, n // k + 1)
		m = k - n % k
		pred = 0
		for i in range(1, k + 1):
			if m > 0:
				print('*', s[pred:pred + n // k], sep='')
				pred += n // k
				m -= 1
			else:
				print(s[pred:pred + n // k + 1])
				pred += n // k + 1


from math import ceil
handle = input()
s = ceil(len(handle) / 20)
t = ceil(len(handle) / s)
print(s, t)
r = t * s - len(handle)
it = 0
for i in range(s):
	string = ''
	for j in range(t):
		if r > 0 and '*' not in string:
			string += '*'
			r -= 1
			continue
		string += handle[it]
		it += 1
	print(string)


s = input()
n = len(s)
a = n // 20
if n % 20 > 0:
	a += 1
b = 0
while True:
	b += 1
	if a * b >= n:
		break
z = a * b - n
l = [[0 for j in range(b)] for i in range(a)]
c = 0
while c < z:
	l[c % a][c // a] = '*'
	c += 1
c = 0
i = 0
while c < a * b:
	if l[c // b][c % b] != '*':
		l[c // b][c % b] = s[i]
		i += 1
	c += 1
c = 0
s = ''
print(str(a) + ' ' + str(b))
for i in range(a):
	s = ''
	for j in range(b):
		s += str(l[i][j])
	print(s)


s = input()
a = len(s) // 20 + (1 if len(s) % 20 != 0 else 0)
b = len(s) // a + (1 if len(s) % a != 0 else 0)
print(a, b)
res = []
id = 0
lenl = len(s)
for i in range(a):
	r = ''
	for j in range(lenl // (a - i)):
		r += s[id]
		id += 1
	res.append(r)
	lenl -= lenl // (a - i)
for r in res:
	print(r + '*' * (b - len(r)))


s = input()
for i in range(1, 6):
	if len(s) <= i * 20:
		lettersCnt = (len(s) + i - 1) // i
		print(i, lettersCnt)
		ost = lettersCnt * i - len(s)
		for j in range(ost, i):
			print(s[:lettersCnt])
			s = s[lettersCnt:]
		for j in range(ost):
			print(s[:lettersCnt - 1], '*', sep='')
			s = s[lettersCnt - 1:]
		break


s = input()
x = len(s)
y = x // 20 + (1 if x // 20 != x / 20 else 0)
c = 0
if x <= 20:
	c = x
	print(y, c)
	print(s)
else:
	c = x // y + (1 if x // y != x / y else 0)
	if x != c * y:
		count = c * y - x
		ss = count // c + (1 if count / c != count // c else 0)
		res = ''
		us_ss = ss
		s = iter(s)
		for i in range(1, c * y + 1):
			if us_ss > 0:
				res += '*'
				count -= 1
				us_ss -= 1
			elif i / c == i // c:
				try:
					res += next(s) + '\n'
					ss = count // c + (1 if count / c != count // c else 0)
					us_ss = ss
				except:
					break
			else:
				try:
					res += next(s)
				except StopIteration:
					res += '*' if i < c * y else ''
		if len(res) < c * y:
			res += '*'
		print(y, c)
		print(res)
	else:
		res = ''
		s = iter(s)
		for i in range(1, c * y + 1):
			if i / c == i // c:
				res += next(s) + '\n'
			else:
				try:
					res += next(s)
				except StopIteration:
					res += '*' if i < c * y else ''
		print(y, c)
		print(res)


R = lambda : list(map(int, input().split()))
s = str(input())
if len(s) % 20:
	n = int(len(s) / 20) + 1
	if n == 1:
		print(1, len(s))
		print(s)
	elif len(s) % n:
		sao = n - len(s) % n
		tm = int((len(s) + sao) / n)
		if sao == 1:
			print(n, tm)
			while n > 1:
				print(s[:tm])
				s = s[tm:]
				n -= 1
			print(s + '*')
		elif sao == 2:
			print(n, tm)
			while n > 2:
				print(s[:tm])
				s = s[tm:]
				n -= 1
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s + '*')
		elif sao == 3:
			print(n, tm)
			while n > 3:
				print(s[:tm])
				s = s[tm:]
				n -= 1
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s + '*')
		else:
			print(n, tm)
			while n > 4:
				print(s[:tm])
				s = s[tm:]
				n -= 1
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s[:tm - 1] + '*')
			s = s[tm - 1:]
			print(s[:tm - 1] + '*')
	else:
		print(n, int(len(s) / n))
		while n > 0:
			print(s[:int(len(s) / n)])
			s = s[int(len(s) / n):]
			n -= 1
else:
	n = int(len(s) / 20)
	print(n, 20)
	while n > 0:
		print(s[:20])
		s = s[20:]
		n -= 1


import sys
handle = sys.stdin.readline()
handle = handle[:-1]
h_len = len(handle)
if h_len % 20 == 0:
	rows = h_len // 20
else:
	rows = h_len // 20 + 1
if h_len % rows == 0:
	columns = h_len // rows
	sys.stdout.write(str(rows) + ' ' + str(columns) + '\n')
	for i in range(1, rows + 1):
		if i != rows:
			sys.stdout.write(handle[(i - 1) * columns:i * columns] + '\n')
		else:
			sys.stdout.write(handle[(i - 1) * columns:] + '\n')
else:
	columns = h_len // rows + 1
	sys.stdout.write(str(rows) + ' ' + str(columns) + '\n')
	not_full_rows = rows * columns - h_len
	index = 0
	for i in range(not_full_rows):
		sys.stdout.write(handle[index:index + columns - 1] + '*\n')
		index = index + columns - 1
	for i in range(rows - not_full_rows):
		if i != rows - not_full_rows:
			sys.stdout.write(handle[index:index + columns] + '\n')
			index = index + columns
		else:
			sys.stdout.write(handle[index:] + '\n')


import sys, math

def mp():
	return list(map(int, input().split()))

def f(a, n, d):
	flag = n % d
	x = n // d
	ans = [''] * d
	j = 0
	for k in range(d):
		for i in range(n // d):
			ans[k] += a[j]
			j += 1
		if n % d:
			n -= 1
			ans[k] += a[j]
			j += 1
		elif flag:
			ans[k] += '*'
		if len(ans[k]) > 20:
			return
	print(d, n // d + bool(flag))
	for i in ans:
		print(i)
	sys.exit()

def main():
	a = input().strip()
	n = len(a)
	for i in range(1, 6):
		f(a, n, i)
debug = 0
if debug:
	file = open('input.txt', 'r')
	input = file.readline
main()
if debug:
	file.close()


a = input().replace('', ' ').split()
b = len(a)
n = 0
if b <= 20:
	n = 1
elif b <= 40:
	n = 2
elif b <= 60:
	n = 3
elif b <= 80:
	n = 4
else:
	n = 5
s = b // n
z = b % n
f = 0
r = []
for i in range(n):
	k = ''
	o = s
	if z:
		o += 1
		z -= 1
	for j in range(o):
		k += a.pop(0)
	r += [k]
z = b % n
p = -1
f = s + (0 if b % n == 0 else 1)
print(n, f)
for i in r:
	if len(i) != f:
		print(i + '*')
	else:
		print(i)


a = input()
if len(a) < 21:
	print(1, len(a))
	print(a)
elif len(a) % 2 == 0 and len(a) < 41:
	print(2, len(a) // 2)
	print(a[:len(a) // 2])
	print(a[len(a) // 2:])
elif len(a) % 2 != 0 and len(a) < 41:
	print(2, len(a) // 2 + 1)
	print(a[:len(a) // 2 + 1])
	print(a[len(a) // 2 + 1:] + '*')
elif len(a) % 3 == 0 and len(a) < 61:
	print(3, len(a) // 3)
	print(a[:len(a) // 3])
	print(a[len(a) // 3:2 * len(a) // 3])
	print(a[2 * len(a) // 3:])
elif len(a) < 61:
	if len(a) % 3 == 1:
		print(3, len(a) // 3 + 1)
		print(a[:len(a) // 3 + 1])
		print(a[len(a) // 3 + 1:2 * len(a) // 3 + 1] + '*')
		print(a[2 * len(a) // 3 + 1:] + '*')
	else:
		print(3, len(a) // 3 + 1)
		print(a[:len(a) // 3 + 1])
		print(a[(len(a) + 1) // 3:2 * len(a) // 3 + 1])
		print(a[2 * len(a) // 3 + 1:] + '*')
elif len(a) % 4 == 0 and len(a) < 81:
	print(4, len(a) // 4)
	print(a[:len(a) // 4])
	print(a[len(a) // 4:2 * len(a) // 4])
	print(a[2 * len(a) // 4:3 * len(a) // 4])
	print(a[3 * len(a) // 4:])
elif len(a) < 81:
	if len(a) % 4 == 1 and len(a) < 81:
		print(4, len(a) // 4 + 1)
		print(a[:len(a) // 4 + 1])
		print(a[len(a) // 4 + 1:2 * len(a) // 4 + 1] + '*')
		print(a[2 * len(a) // 4 + 1:3 * len(a) // 4 + 1] + '*')
		print(a[3 * len(a) // 4 + 1:] + '*')
	elif len(a) % 4 == 2 and len(a) < 81:
		print(4, len(a) // 4 + 1)
		print(a[:len(a) // 4 + 1])
		print(a[len(a) // 4 + 1:2 * len(a) // 4 + 1])
		print(a[2 * len(a) // 4 + 1:3 * len(a) // 4 + 1] + '*')
		print(a[3 * len(a) // 4 + 1:] + '*')
	elif len(a) % 4 == 3 and len(a) < 81:
		print(4, len(a) // 4 + 1)
		print(a[:len(a) // 4 + 1])
		print(a[len(a) // 4 + 1:2 * len(a) // 4 + 1])
		print(a[2 * len(a) // 4 + 1:3 * len(a) // 4 + 1])
		print(a[3 * len(a) // 4 + 1:] + '*')
elif len(a) < 101:
	if len(a) % 5 == 4:
		print(5, len(a) // 5 + 1)
		print(a[:len(a) // 5 + 1])
		print(a[len(a) // 5 + 1:2 * len(a) // 5 + 1])
		print(a[2 * len(a) // 5 + 1:3 * len(a) // 5 + 1])
		print(a[3 * len(a) // 5 + 1:4 * len(a) // 5 + 1])
		print(a[4 * len(a) // 5 + 1:] + '*')
	if len(a) % 5 == 2:
		print(5, len(a) // 5 + 1)
		print(a[:len(a) // 5 + 1])
		print(a[len(a) // 5 + 1:2 * len(a) // 5 + 2])
		print(a[2 * len(a) // 5 + 2:3 * len(a) // 5 + 1] + '*')
		print(a[3 * len(a) // 5 + 1:4 * len(a) // 5 + 1] + '*')
		print(a[4 * len(a) // 5 + 1:] + '*')
	if len(a) % 5 == 3:
		print(5, len(a) // 5 + 1)
		print(a[:len(a) // 5 + 1])
		print(a[len(a) // 5 + 1:2 * (len(a) // 5) + 2])
		print(a[2 * len(a) // 5 + 1:3 * len(a) // 5 + 1] + '*')
		print(a[3 * len(a) // 5 + 1:4 * len(a) // 5 + 1])
		print(a[4 * len(a) // 5 + 1:] + '*')
	if len(a) % 5 == 1:
		print(5, len(a) // 5 + 1)
		print(a[:len(a) // 5 + 1])
		print(a[len(a) // 5 + 1:2 * len(a) // 5 + 1] + '*')
		print(a[2 * len(a) // 5 + 1:3 * len(a) // 5 + 1] + '*')
		print(a[3 * len(a) // 5 + 1:4 * len(a) // 5 + 1] + '*')
		print(a[4 * len(a) // 5 + 1:] + '*')
	if len(a) % 5 == 0:
		print(5, len(a) // 5)
		print(a[:len(a) // 5])
		print(a[len(a) // 5:2 * len(a) // 5])
		print(a[2 * len(a) // 5:3 * len(a) // 5])
		print(a[3 * len(a) // 5:4 * len(a) // 5])
		print(a[4 * len(a) // 5:])


s = list(input())
r = len(s) // 20 + (len(s) % 20 != 0)
c = len(s) // r + (len(s) % r != 0)
for i in range((r - len(s) % r) % r):
	s.insert(c * i, '*')
print(r, c)
for i in range(r):
	print(''.join(s[c * i:c * (i + 1)]))


hendl = str(input())
n = len(hendl)
a_max = 5
b_max = 20
a = 0
b = 0
for i in range(1, a_max + 1):
	a = i
	b = n / i
	if b <= b_max:
		b = n // i
		if n % i != 0:
			b += 1
		break
print(a, b)
hendl_table = []
for i in range(a - (a * b - n)):
	hendl_table.append(hendl[:b])
	hendl = hendl[b:]
for i in range(a - (a * b - n), a):
	hendl_table.append(hendl[:b - 1] + '*')
	hendl = hendl[b - 1:]
for i in range(a):
	print(hendl_table[i])
print(hendl[-1:0])


s = input()
l = len(s)
if l <= 20:
	print(1, l)
	print(s)
elif l <= 40:
	print(2, (l + 1) // 2)
	print(s[:(l + 1) // 2])
	print(s[(l + 1) // 2:], end='')
	if l % 2:
		print('*')
elif l <= 60:
	print(3, (l + 2) // 3)
	if l % 3 == 0:
		print(s[:l // 3])
		print(s[l // 3:l // 3 * 2])
		print(s[l // 3 * 2:])
	elif l % 3 == 1:
		l += 2
		print(s[:l // 3])
		print(s[l // 3:l // 3 * 2 - 1], '*', sep='')
		print(s[l // 3 * 2 - 1:], '*', sep='')
	elif l % 3 == 2:
		l += 1
		print(s[:l // 3])
		print(s[l // 3:l // 3 * 2])
		print(s[l // 3 * 2:], '*', sep='')
elif l <= 80:
	print(4, (l + 3) // 4)
	if l % 4 == 1:
		l += 3
		print(s[:l // 4])
		print(s[l // 4:l // 4 * 2 - 1], '*', sep='')
		print(s[l // 4 * 2 - 1:l // 4 * 3 - 2], '*', sep='')
		print(s[l // 4 * 3 - 2:], '*', sep='')
	elif l % 4 == 2:
		l += 2
		print(s[:l // 4])
		print(s[l // 4:l // 4 * 2])
		print(s[l // 4 * 2:l // 4 * 3 - 1], '*', sep='')
		print(s[l // 4 * 3 - 1:], '*', sep='')
	elif l % 4 == 3:
		l += 1
		print(s[:l // 4])
		print(s[l // 4:l // 4 * 2])
		print(s[l // 4 * 2:l // 4 * 3])
		print(s[l // 4 * 3:], '*', sep='')
	elif l % 4 == 0:
		print(s[:l // 4])
		print(s[l // 4:l // 4 * 2])
		print(s[l // 4 * 2:l // 4 * 3])
		print(s[l // 4 * 3:])
else:
	print(5, (l + 4) // 5)
	if l % 5 == 1:
		l += 4
		print(s[:l // 5])
		print(s[l // 5:l // 5 * 2 - 1], '*', sep='')
		print(s[l // 5 * 2 - 1:l // 5 * 3 - 2], '*', sep='')
		print(s[l // 5 * 3 - 2:l // 5 * 4 - 3], '*', sep='')
		print(s[l // 5 * 4 - 3:], '*', sep='')
	elif l % 5 == 2:
		l += 3
		print(s[:l // 5])
		print(s[l // 5:l // 5 * 2])
		print(s[l // 5 * 2:l // 5 * 3 - 1], '*', sep='')
		print(s[l // 5 * 3 - 1:l // 5 * 4 - 2], '*', sep='')
		print(s[l // 5 * 4 - 2:], '*', sep='')
	elif l % 5 == 3:
		l += 2
		print(s[:l // 5])
		print(s[l // 5:l // 5 * 2])
		print(s[l // 5 * 2:l // 5 * 3])
		print(s[l // 5 * 3:l // 5 * 4 - 1], '*', sep='')
		print(s[l // 5 * 4 - 1:], '*', sep='')
	elif l % 5 == 4:
		l += 1
		print(s[:l // 5])
		print(s[l // 5:l // 5 * 2])
		print(s[l // 5 * 2:l // 5 * 3])
		print(s[l // 5 * 3:l // 5 * 4])
		print(s[l // 5 * 4:], '*', sep='')
	elif l % 5 == 0:
		print(s[:l // 5])
		print(s[l // 5:l // 5 * 2])
		print(s[l // 5 * 2:l // 5 * 3])
		print(s[l // 5 * 3:l // 5 * 4])
		print(s[l // 5 * 4:])


n = input().strip()
l = len(n)
if l % 20 != 0:
	a = l // 20 + 1
else:
	a = l // 20
if l % a != 0:
	b = l // a + 1
else:
	b = l // a
num_astric = a * b - l
print(a, b)
f = a - num_astric - 1
k = 0
e = b
for i in range(a):
	if i > f:
		print(n[k:e - 1], end='')
		print('*')
		k += b - 1
		e += b - 1
	else:
		print(n[k:e])
		k += b
		e += b


s = input()
x = (len(s) - 1) // 20 + 1
ost = (20 - len(s) % 20) % 20
y = min(20, len(s))
if y == 20:
	y -= ost // x
ost %= x
print(x, y)
ch = 0
for i in range(x):
	for j in range(y - 1):
		print(s[ch], end='')
		ch += 1
	if ost > 0:
		print('*', end='')
		ost -= 1
	else:
		print(s[ch], end='')
		ch += 1
	print()


s = input()
d = len(s)
a = []
for i in range(1, 6):
	for j in range(1, 21):
		if i * j >= d:
			a.append([i, j])
a.sort()
st = a[0][0]
t = a[0][1]
print(st, t)
stars = st * t - d
stl = stars % st
p = 0
for i in range(st):
	if i < st - stl:
		print(s[p:t * (i + 1)])
		p = t * (i + 1)
	elif i != st - 1:
		print(s[p:t + p - 1] + '*')
		p = t + p - 1
	else:
		print(s[d - t + 1:] + '*')


import math
data = input()
n_max = 5
m_max = 20
lst_mod = [0]
lst_div = [0]
for i in range(1, n_max + 1):
	lst_mod.append(len(data) % i)
	lst_div.append(math.ceil(len(data) / i))
lst_z_count = [0]
answer = (0, 0)
for i in range(1, n_max + 1):
	if lst_div[i] <= 20:
		k = lst_mod[i]
		lst_z_count.append(k)
		answer = (i, lst_div[i])
		break
	else:
		lst_z_count.append(-1)
lst_ans = []
temp_ans = data
for i in range(0, answer[0] * answer[1] - len(data)):
	temp_ans = temp_ans[:i * answer[1]] + '*' + temp_ans[i * answer[1]:]
print(answer[0], answer[1])
for i in range(0, answer[0]):
	print(temp_ans[i * answer[1]:(i + 1) * answer[1]])


s = input()
sz = len(s)
h = 0
l = 0
for i in range(1, 6):
	if sz / i <= 20:
		h = i
		if sz / i > int(sz / i):
			l = sz // i + 1
		else:
			l = sz // i
		break
cnt = h * l - sz
sz1 = cnt // h
sz2 = sz1 + 1
f = 1
for a in range(101):
	if f:
		for b in range(101):
			if sz1 * a + sz2 * b == cnt and a + b <= h:
				f = 0
				a1 = a
				b1 = b
				break
c1 = h - a1 - b1
print(h, l)
for i in range(a1):
	print(s[:l - sz1], end='')
	s = s[l - sz1:]
	print('*' * sz1, end='')
	print()
for i in range(b1):
	print(s[:l - sz2], end='')
	s = s[l - sz2:]
	print('*' * sz2, end='')
	print()
for i in range(c1):
	print(s[:l])
	s = s[l:]


def PC():
	i = input()
	a = 1
	if len(i) < 20:
		print(a, len(i))
		print(i)
	else:
		for na in range(1, 6):
			for nb in range(na):
				l_nb = (len(i) + nb) % na
				i_nb = int((len(i) + nb) / na)
				if l_nb == 0 and i_nb <= 20:
					print(na, i_nb)
					nj = 0
					for n1 in range(0, na):
						if na - nb > n1:
							print(i[n1 * i_nb:(n1 + 1) * i_nb], end='')
						if na - nb == n1:
							nj = nj + 1
							print(i[n1 * i_nb - nj + 1:(n1 + 1) * i_nb - nj], end='')
							print('*', end='')
							nb = nb - 1
						print('')
					return
PC()


s = input()
n = len(s)
a = (n - 1) // 20 + 1
b = (n - 1) // a + 1
print(a, b)
cnt = a * b - n
cur = 0
for i in range(a):
	if cnt:
		print('*', end='')
		cnt -= 1
		for j in range(b - 1):
			print(s[cur], end='')
			cur += 1
	else:
		for j in range(b):
			print(s[cur], end='')
			cur += 1
	print()


S = input()
ls = len(S)
point = -1
h = ls // 20
if ls % 20 != 0:
	h += 1
a = ls // h
if ls % h != 0:
	a += 1
Table = []
for i in range(h):
	Table.append([0] * a)
stars = a * h - ls
starsinline = stars // h
extra = stars % h
for i in range(h):
	for j in range(a):
		if h - i <= extra and j == a - 1:
			Table[i][j] = '*'
		elif j + starsinline >= a:
			Table[i][j] = '*'
		else:
			point += 1
			Table[i][j] = S[point]
print(h, end=' ')
print(a)
for i in range(h):
	for j in range(a):
		print(Table[i][j], end='')
	print()


def read_int():
	return int(input().strip())

def read_int_list():
	return list(map(int, input().strip().split()))

def read_string():
	return input().strip()

def read_string_list(delim=' '):
	return input().strip().split(delim)
s = read_string()
n = len(s)
out = []
for i in range(1, 5 + 1):
	for j in range(1, 20 + 1):
		if i * j >= n:
			if out == []:
				out = [i, j]
h = out[0]
w = out[1]
num_asterix = h * w - n
lines = []
for i in range(h):
	lines.append('')
head = 0
for i in range(num_asterix):
	lines[head % h] += '*'
	head += 1
head = 0
for i in range(h):
	rem = w - len(lines[i])
	lines[i] += s[head:head + rem]
	head += rem
print(h, w)
for l in lines:
	print(l)


def rup(n):
	if n < 0:
		n = 0
	return n
s = input()
ls = len(s)
fr = False
for i in range(1, 6):
	for j in range(1, 21):
		if ls - i * j <= 0:
			kz = i * j - ls
			fr = True
			break
	if fr:
		break
print(i, j)
c = 0
for k in range(i):
	if kz > 0:
		kz -= 1
		c += 1
		print('*', end='')
		print(s[k * j - c + 1:k * j + j - c])
	else:
		print(s[k * j - c:k * j + j - c])


s = input()
n = len(s)
a = (n + 19) // 20
ones = n // a
r = n % a
if r:
	print(a, ones + 1)
else:
	print(a, ones)
last = 0
for i in range(a):
	if i < r:
		print(s[last:last + ones + 1])
		last = last + ones + 1
	else:
		if r:
			print(s[last:last + ones] + '*')
		else:
			print(s[last:last + ones])
		last = last + ones


s = input()
a = 5
b = 20
x = len(s)
x = x // b + (0 if x % b == 0 else 1)
ans1 = x
y = len(s) // x + (1 if len(s) % x != 0 else 0)
z = x * y - len(s)
tru_y = y
print(ans1, y)
last = 0
for i in range(x):
	if x - i > z:
		print(s[i * y:(i + 1) * y])
		last = (i + 1) * y
	else:
		print(s[last:last + (y - 1)] + '*')
		last += y - 1


n = input()
from math import ceil
stroka = ceil(len(n) / 20)
if len(n) % stroka > 0:
	stolb = len(n) // stroka + 1
	zvezda = stroka - len(n) % stroka
else:
	stolb = len(n) // stroka
	zvezda = 0
p = 0
for i in range(zvezda):
	n = n[0:i * stolb] + '*' + n[i * stolb:]
print(stroka, stolb)
for i in range(stroka):
	for j in range(stolb):
		print(n[j + p], end='')
	p += stolb
	print()


import math
s = 'iHufyYRNbXpCmShignQspDPfOpHsTJImVaShhpEsfLcTJushZgoeq'
s = input().strip()
s_len = len(s)
s_r = 0
s_c = 0
a_cnt = 0
for c in range(20, 0, -1):
	r = math.ceil(s_len / c)
	a_cnt = abs(r * c - s_len)
	if a_cnt < r:
		s_r = r
		s_c = c
		while a_cnt > 0:
			s = s[:a_cnt * c + 1] + '*' + s[a_cnt * c + 1:]
			a_cnt -= 1
		break
print('{} {}'.format(s_r, s_c))
for r in range(s_r):
	print(s[r * s_c:(r + 1) * s_c])


s = input()
n = len(s)
k = n // 20 + (1 if n % 20 else 0)
line = n // k + (1 if n % k else 0)
answer = [[0 for i in range(line)] for i in range(k)]
for i in range(n):
	answer[i % k][i // k] = 1
cou = 0
for i in range(k):
	for j in range(line):
		if answer[i][j] == 1:
			answer[i][j] = s[cou]
			cou += 1
		else:
			answer[i][j] = '*'
print(k, line)
for i in answer:
	print(*i, sep='')


import math
s = input()
max_a = 5
max_b = 20
a = 0
b = 0
for i in range(1, max_a + 1):
	if math.ceil(len(s) / i) <= max_b:
		a = i
		b = math.ceil(len(s) / i)
		break
cnt = b * a - len(s)
print(a, b)
ind = 0
for i in range(a):
	if cnt != 0:
		print(s[ind:ind + b - 1] + '*')
		cnt -= 1
		ind = ind + b - 1
	else:
		print(s[ind:ind + b])
		ind = ind + b


string = input()
dl = len(string)
if dl % 20 == 0:
	kol_vo_str = dl // 20
else:
	kol_vo_str = dl // 20 + 1
dl_str = dl // kol_vo_str
if dl - dl_str * kol_vo_str == 0:
	counter1 = 0
	counter2 = dl_str
	print(kol_vo_str, dl_str)
	for i in range(kol_vo_str):
		print(string[counter1:counter2])
		counter1 += dl_str
		counter2 += dl_str
else:
	dl_str += 1
	counter1 = 0
	counter2 = dl_str
	print(kol_vo_str, dl_str)
	for i in range(kol_vo_str):
		if dl - dl_str * kol_vo_str != 0:
			print('*', end='')
			dl += 1
			print(string[counter1:counter2 - 1])
			counter1 += dl_str - 1
			counter2 += dl_str - 1
		else:
			print(string[counter1:counter2])
			counter1 += dl_str
			counter2 += dl_str


s = input()
q = len(s)
strok = (q - 1) // 20 + 1
stolbtcov = (q - 1) // strok + 1
zvezd = strok * stolbtcov - q
a1 = zvezd // strok
a2 = zvezd % strok
print(strok, stolbtcov)
for j in range(strok - a2):
	print(s[stolbtcov * j:stolbtcov * (j + 1) - a1] + '*' * a1)
for i in range(strok - a2, strok):
	print(s[stolbtcov * i - a1 * (strok - a2) - (i + a2 - strok) * (a1 + 1):stolbtcov * (i + 1) - a1 * (strok - a2) - 1 - (i + a2 - strok) * (a1 + 1)] + '*' * (a1 + 1))


s = input()
a = (len(s) + 19) // 20
b = (len(s) + a - 1) // a
print(a, b)
k = a * b - len(s)
x = 0
for i in range(a):
	if k > 0:
		for j in range(b - 1):
			print(s[i * b + j - x], end='')
		print('*')
		k = k - 1
		x = x + 1
	else:
		for j in range(b):
			print(s[i * b + j - x], end='')
		print()


def get_a_b(n):
	for i in range(1, 6):
		for j in range(1, 21):
			if i * j >= n and i * j <= n + i - 1:
				return (i, j)
handle = input()
a = 0
b = 0
(a, b) = get_a_b(len(handle))
sts = a * b - len(handle)
res = [[0 for i in range(b)] for i in range(a)]
q = 0
while sts != 0:
	res[a - 1 - q][b - 1] = '*'
	sts -= 1
	q += 1
for i in range(a):
	for j in range(b):
		if res[i][j] != '*':
			res[i][j] = handle[0]
			handle = handle[1:]
print(a, b)
for i in res:
	print(''.join(i))


s = input()
n = len(s)
a = n // 20
if n % 20 > 0:
	a += 1
print(a, end=' ')
b = n // a
if n % a != 0:
	b += 1
print(b)
empty = a - n % a
finish = 2 * b - 1
if n % a == 0:
	empty = 0
	finish += 1
print(s[:b])
start = b
for i in range(1, a):
	if empty > 0:
		print(s[start:finish] + '*')
		empty -= 1
		start += b - 1
		finish += b - 1
		if empty == 0:
			finish += 1
	else:
		print(s[start:finish])
		start += b
		finish += b


from math import ceil
str = input()
lst = list(str)
n = len(str)
row = ceil(n / 20)
col = ceil(n / row)
stars = row * col - n
print(row, col)
q = 0
for i in range(row):
	for j in range(col):
		if i >= n % row and j == col - 1 and (stars > 0):
			print('*', end='')
			stars -= 1
		else:
			print(lst[q], end='')
			q += 1
	print()


from collections import deque as de
import math
import re
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb
from fractions import Fraction as fr
from bisect import bisect_left as bl, bisect_right as br

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binarytodecimal(n):
	return int(n, 2)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product

def dupconscount(nums):
	element = []
	freque = []
	if not nums:
		return element
	running_count = 1
	for i in range(len(nums) - 1):
		if nums[i] == nums[i + 1]:
			running_count += 1
		else:
			freque.append(running_count)
			element.append(nums[i])
			running_count = 1
	freque.append(running_count)
	element.append(nums[i + 1])
	return (element, freque)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def ceildiv(x, y):
	return (x + y - 1) // y

def di():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return list(map(str, input()))
s = si()
if len(s) <= 20:
	print(1, len(s))
	print(''.join(s))
else:
	row = 0
	for i in range(1, 6):
		if math.ceil(len(s) / i) <= 20:
			row = i
			break
	netas = math.ceil(len(s) / i) * i - len(s)
	difff = math.ceil(len(s) / i)
	for i in range(1, netas + 1):
		s.insert(i * difff, '*')
	part_size = difff
	k = 0
	print(row, difff)
	for i in s:
		if k % part_size == 0 and k:
			print(end='\n')
		print(i, end='')
		k += 1


s = input()
for i in range(5):
	for j in range(20):
		l = (i + 1) * (j + 1) - len(s)
		if l >= 0:
			print(i + 1, j + 1)
			n = l // (i + 1)
			m = l % (i + 1)
			for k in range(m):
				print(s[:j - n] + '*' * (n + 1))
				s = s[j - n:]
			for k in range(i + 1 - m):
				print(s[:j + 1 - n] + '*' * n)
				s = s[j + 1 - n:]
			break
	if l >= 0:
		break


n = input()
s = len(n)
if s == 1:
	print(1, 1)
	print(n)
else:
	string = (s - 1) // 20 + 1

	def isReal(l):
		newS = s - l
		if (string - 1) * (l - 1) <= newS <= (string - 1) * l:
			return True
		else:
			return False
	l = 1
	while not isReal(l):
		l += 1
	print(string, l)
	start = 0

	def pn(x, y):
		global start
		print(n[start:start + x] + y)
		start += x
	pn(l, '')
	s -= l
	while s % (l - 1) != 0:
		pn(l, '')
		s -= l
	while s != 0:
		pn(l - 1, '*')
		s -= l - 1


s = input()
overall = len(s)

def gen():
	global overall
	for i in range(5):
		for j in range(20):
			length = (i + 1) * (j + 1)
			if overall <= length:
				return (i + 1, j + 1, length - overall)
(strs, cols, stars) = gen()
every = stars // strs
print(strs, cols)
tmp = 0
for i in range(strs):
	st = every * strs + i + 1 <= stars
	new = s[i * cols - tmp:(i + 1) * cols - st - tmp] + '*' * st
	tmp += st
	print(new)


a = input()
b = (len(a) + 19) // 20
c = (20 - len(a) % 20) % 20
t = 20
q = 0
while c >= b:
	c -= b
	t -= 1
print(b, t)
for i in range(b):
	if c != 0:
		c -= 1
		print('*', end='')
		print(a[q:q + t - 1])
		q += t - 1
	else:
		print(a[q:q + t])
		q += t


s = input()
n = len(s)
if n % 20 == 0:
	print(n // 20, 20)
	for i in range(n // 20):
		print(s[i * 20:i * 20 + 20])
else:
	ned = n // 20 + 1
	x = n // ned
	p = n % ned
	T = False
	if p != 0:
		print(ned, x + 1)
		T = True
	else:
		print(ned, x)
	cur = 0
	for i in range(ned):
		st = cur
		cur += x
		if p != 0:
			cur += 1
			p -= 1
		elif T:
			print('*', end='')
		print(s[st:cur])


from sys import stdin, stdout
s = input()
N = len(s)

def factor(num):
	for i in range(1, 6):
		A = i
		if num % A == 0:
			B = num // A
		if B <= 20:
			return [A, B]
	return []
R = 99
C = 99
for i in range(N, 101):
	f = factor(i)
	if f:
		if f[0] < R:
			R = f[0]
			C = f[1]
print(R, C)
d = R * C - N
star = [0] * R
for i in range(R):
	star[i] = d // R
for i in range(d % R):
	star[i] += 1
k = 0
for i in range(R):
	for j in range(star[i]):
		print('*', end='')
	for j in range(C - star[i]):
		print(s[k], end='')
		k += 1
	print('', end='\n')


import math
n = input()
a = math.ceil(len(n) / 20)
b = math.ceil(len(n) / a)
print(a, b)
su = 0
zvezd = b - (len(n) - (a - 1) * b)
if zvezd != -1:
	t = b
	b -= 1
	for i in range(a):
		if zvezd != 0:
			print(n[su:su + b] + '*')
			zvezd -= 1
			su += b
		else:
			b = t
			print(n[su:su + b])
			su += b


s = input()
l = len(s)
left = l % 20
min_str = l // 20 + 1 if left != 0 else l // 20
avg = l // min_str if l % min_str == 0 else l // min_str + 1
still_left = avg * min_str - l
print('%i %i' % (min_str, avg))
for i in range(min_str):
	if still_left != 0:
		str = s[:avg - 1] + '*'
		s = s[avg - 1:]
		still_left -= 1
	else:
		str = s[:avg]
		s = s[avg:]
	print(str)


def process(S):
	n = len(S)
	rows = n // 20
	if n % 20 != 0:
		rows += 1
	cols = n // rows
	if n % rows != 0:
		cols = cols + 1
	aster = rows * cols - n
	y = aster % rows
	x = rows - y
	R = aster // rows
	answer = []
	I = 0
	for i in range(rows):
		entry = ''
		if i < x:
			for j in range(cols - R):
				entry += S[I]
				I += 1
			for j in range(R):
				entry += '*'
		else:
			for j in range(cols - R - 1):
				entry += S[I]
				I += 1
			for j in range(R + 1):
				entry += '*'
		answer.append(entry)
	return answer
S = input()
answer = process(S)
(a, b) = (len(answer), len(answer[0]))
print(f'{a} {b}')
for row in answer:
	print(row)


a = input()
str1 = (len(a) - 1) // 20 + 1
sto1 = (len(a) + str1 - 1) // str1
f = str1 - 1 - (len(a) + str1 - 1) % str1
print(str1, sto1)
for q in range(str1):
	if q < f:
		print(*a[(sto1 - 1) * q:(sto1 - 1) * (q + 1)], '*', sep='')
	else:
		print(*a[(sto1 - 1) * f + sto1 * (q - f):(sto1 - 1) * f + sto1 * (q - f + 1)], sep='')


s = input()
(n, r) = divmod(len(s), 20)
if r != 0:
	n += 1
(m, r) = divmod(len(s), n)
if r != 0:
	r = n - r
	m += 1
print(n, m)
cur = 0
for _ in range(n - r):
	print(s[cur:cur + m])
	cur += m
for _ in range(r):
	print('*' + s[cur:cur + m - 1])
	cur += m - 1


import math
s = input()
size = len(s)
rows = math.ceil(size / 20)
stars = 0
while size % rows != 0:
	size += 1
	stars += 1
collumns = int(size / rows)
quantity = 0
print(rows, collumns)
for i in range(rows):
	print(s[quantity:quantity + (collumns - 1 if stars > 0 else collumns)], end='')
	quantity += collumns - 1 if stars > 0 else collumns
	if stars > 0:
		print('*', end='')
		stars -= 1
	print()


string = list(input())
len_string = len(string)
if len_string <= 20:
	print(1, len_string)
	print(''.join(string))
	quit(0)
if 20 < len_string < 41:
	if len_string % 2 != 0:
		string.append('*')
		len_string += 1
	print(2, len_string // 2)
	print(''.join(string[:len_string // 2]))
	print(''.join(string[len_string // 2:]))
	quit(0)
if 40 < len_string < 61:
	if len_string % 3 == 2:
		len_string += 1
		string.append('*')
	elif len_string % 3 == 1:
		string = ['*'] + string
		string.append('*')
		len_string += 2
	print(3, len_string // 3)
	print(''.join(string[:len_string // 3]))
	print(''.join(string[len_string // 3:2 * len_string // 3]))
	print(''.join(string[2 * len_string // 3:]))
	quit(0)
if 60 < len_string < 81:
	if len_string % 4 == 3:
		len_string += 1
		string.append('*')
	elif len_string % 4 == 2:
		string = ['*'] + string
		string.append('*')
		len_string += 2
	elif len_string % 4 == 1:
		len_string += 3
		string = ['*'] + string
		string.append('*')
		string.insert(len_string // 4 + 2, '*')
	print(4, len_string // 4)
	print(''.join(string[:len_string // 4]))
	print(''.join(string[len_string // 4:2 * len_string // 4]))
	print(''.join(string[2 * len_string // 4:3 * len_string // 4]))
	print(''.join(string[3 * len_string // 4:]))
	quit(0)
if 80 < len_string < 101:
	if len_string % 5 == 4:
		len_string += 1
		string.append('*')
	elif len_string % 5 == 3:
		string = ['*'] + string
		string.append('*')
		len_string += 2
	elif len_string % 5 == 2:
		len_string += 3
		string = ['*'] + string
		string.append('*')
		string.insert(len_string // 5 + 2, '*')
	elif len_string % 5 == 1:
		len_string += 4
		string = ['*'] + string
		string.append('*')
		string.insert(len_string // 5 + 2, '*')
		string.insert(2 * len_string // 5 + 2, '*')
	print(5, len_string // 5)
	print(''.join(string[:len_string // 5]))
	print(''.join(string[len_string // 5:2 * len_string // 5]))
	print(''.join(string[2 * len_string // 5:3 * len_string // 5]))
	print(''.join(string[3 * len_string // 5:4 * len_string // 5]))
	print(''.join(string[4 * len_string // 5:]))
	quit(0)


s = input()
if len(s) % 20 != 0 and len(s) // 20 != 0:
	n = len(s) // 20 + 1
	if len(s) % n == 0:
		k = len(s)
	else:
		k = (len(s) // n + 1) * n
elif len(s) % 20 == 0:
	n = len(s) // 20
	k = len(s)
else:
	n = 1
	k = len(s)
p = k - len(s)
print(n, k // n)
for c in range(p):
	s = s[:k // n * c] + '*' + s[k // n * c:]
for c in range(n):
	print(s[:k // n])
	s = s[k // n:]


s = input()
l = len(s)
m = (l + 19) // 20
n = (l + m - 1) // m
t = m - n * m % l
print(m, n)
for i in range(m):
	if t > 0:
		t -= 1
		print(s[0:n])
		s = s[n:]
	else:
		print(s[0:n - 1] + '*')
		s = s[n - 1:]


x = input()
d = len(x)
a = d // 20
z = 0
if d % 20 > 0:
	a = a + 1
if a > 0:
	b = d // a
	if d % a > 0:
		b = b + 1
		z = a - d % a
else:
	b = d
	z = 0
print(a, b)
v = 0
for i in range(a):
	if i < z:
		print(x[v:v + b - 1], '*', sep='')
		v = v + b - 1
	else:
		print(x[v:v + b])
		v = v + b


s = input()
n = len(s)
if n <= 20:
	print(1, n)
	print(s)
elif n % 20 == 0:
	line = n // 20
	print(line, 20)
	for i in range(n):
		print(s[i], end='')
		if (i + 1) % 20 == 0:
			print()
else:
	line = n // 20 + 1
	kz = n % line
	if line == 2:
		if kz == 0:
			print(2, n // 2)
			print(s[0:n // 2])
			print(s[n // 2:n])
		else:
			print(2, n // 2 + 1)
			print(s[0:n // 2 + 1])
			print(s[n // 2 + 1:n], '*', sep='')
	elif line == 3:
		if kz == 0:
			print(3, n // 3)
			print(s[0:n // 3])
			print(s[n // 3:2 * n // 3])
			print(s[2 * n // 3:n])
		elif kz == 1:
			print(3, n // 3 + 1)
			print(s[0:n // 3 + 1])
			print(s[n // 3 + 1:2 * n // 3 + 1], '*', sep='')
			print(s[2 * n // 3 + 1:n], '*', sep='')
		else:
			print(3, n // 3 + 1)
			print(s[0:n // 3 + 1])
			print(s[n // 3 + 1:2 * n // 3 + 1])
			print(s[2 * n // 3 + 1:n], '*', sep='')
	elif line == 4:
		if kz == 0:
			print(4, n // 4)
			print(s[0:n // 4])
			print(s[n // 4:2 * n // 4])
			print(s[2 * n // 4:3 * n // 4])
			print(s[3 * n // 4:n])
		elif kz == 1:
			print(4, n // 4 + 1)
			print(s[0:n // 4 + 1])
			print(s[n // 4 + 1:2 * n // 4 + 1], '*', sep='')
			print(s[2 * n // 4 + 1:3 * n // 4 + 1], '*', sep='')
			print(s[3 * n // 4 + 1:n], '*', sep='')
		elif kz == 2:
			print(4, n // 4 + 1)
			print(s[0:n // 4 + 1])
			print(s[n // 4 + 1:2 * n // 4 + 1])
			print(s[2 * n // 4 + 1:3 * n // 4 + 1], '*', sep='')
			print(s[3 * n // 4 + 1:n], '*', sep='')
		elif kz == 3:
			print(4, n // 4 + 1)
			print(s[0:n // 4 + 1])
			print(s[n // 4 + 1:2 * n // 4 + 1])
			print(s[2 * n // 4 + 1:3 * n // 4 + 1])
			print(s[3 * n // 4 + 1:n], '*', sep='')
	elif line == 5:
		if kz == 0:
			print(5, n // 5)
			print(s[0:n // 5])
			print(s[n // 5:2 * n // 5])
			print(s[2 * n // 5:3 * n // 5])
			print(s[3 * n // 5:4 * n // 5])
			print(s[4 * n // 5:n])
		elif kz == 1:
			print(5, n // 5 + 1)
			print(s[0:n // 5 + 1])
			print(s[n // 5 + 1:2 * n // 5 + 1], '*', sep='')
			print(s[2 * n // 5 + 1:3 * n // 5 + 1], '*', sep='')
			print(s[3 * n // 5 + 1:4 * n // 5 + 1], '*', sep='')
			print(s[4 * n // 5 + 1:n], '*', sep='')
		elif kz == 2:
			print(5, n // 5 + 1)
			print(s[0:n // 5 + 1])
			print(s[n // 5 + 1:2 * (n // 5 + 1)])
			print(s[2 * (n // 5 + 1):3 * n // 5 + 1], '*', sep='')
			print(s[3 * n // 5 + 1:4 * n // 5 + 1], '*', sep='')
			print(s[4 * n // 5 + 1:n], '*', sep='')
		elif kz == 3:
			print(5, n // 5 + 1)
			print(s[0:n // 5 + 1])
			print(s[n // 5 + 1:2 * n // 5 + 1])
			print(s[2 * n // 5 + 1:3 * (n // 5 + 1)])
			print(s[3 * (n // 5 + 1):4 * n // 5 + 1], '*', sep='')
			print(s[4 * n // 5 + 1:n], '*', sep='')
		elif kz == 4:
			print(5, n // 5 + 1)
			print(s[0:n // 5 + 1])
			print(s[n // 5 + 1:2 * n // 5 + 1])
			print(s[2 * n // 5 + 1:3 * n // 5 + 1])
			print(s[3 * n // 5 + 1:4 * n // 5 + 1])
			print(s[4 * n // 5 + 1:n], '*', sep='')


name = list(input())
l = len(name)
a = l // 20
if l / 20 > a:
	a += 1
b = l // a
if l / a > b:
	b += 1
z = a * b - l
r = z // a
j = z % a
t = []
for q in range(a):
	t.append('')
	if j > 0:
		x = r + 1
		j -= 1
	else:
		x = r
	for g in range(b):
		if x != 0:
			t[-1] += '*'
			x -= 1
		else:
			t[-1] += name[0]
			del name[0]
print(a, b)
print('\n'.join(t))


import math
str1 = input()
length = len(str1)
rows = math.ceil(length / 20)
collums = math.ceil(length / rows)
k = rows * collums - length
zv = 0
print(rows, collums)
b = [0] * rows
for i in range(rows):
	b[i] = k // (rows - i)
	k -= k // (rows - i)
for i in range(rows):
	print(str1[collums * i - zv:collums * (i + 1) - b[i] - zv], '*' * b[i], sep='')
	zv += b[i]


import sys
import math
handle = ''
for line in sys.stdin:
	handle = line.strip()
handle_len = len(handle)
min_rows = int(math.ceil(handle_len / 20.0))
min_cols = int(math.ceil(handle_len / float(min_rows)))
print(str(min_rows) + ' ' + str(min_cols))
num_astericks = min_rows * min_cols - handle_len
prev_row_pos = 0
for i in range(min_rows):
	if num_astericks > 0:
		row = '*' + handle[prev_row_pos:prev_row_pos + min_cols - 1]
		prev_row_pos += min_cols - 1
		num_astericks -= 1
	else:
		row = handle[prev_row_pos:prev_row_pos + min_cols]
		prev_row_pos += min_cols
	print(row)


import math
string = input()
n = math.ceil(len(string) / 20)
print(n, end=' ')
m = math.ceil(len(string) / n)
print(m)
k = m * n - len(string)
count = 0
for i in range(k):
	print(string[count:count + m - 1] + '*')
	count += m - 1
for i in range(n - k):
	print(string[count:count + m])
	count += m


import math
data = input()
out = []
c = len(data)
for i in range(math.ceil(c / 20)):
	if c // 20 >= 1:
		out.append(20)
		c -= 20
	else:
		out.append(c)
		c = 0

def cor(ind):
	if out[ind] - out[ind + 1] > 1:
		out[ind] -= 1
		out[ind + 1] += 1
for i in range(100):
	for g in range(len(out) - 2, -1, -1):
		cor(g)
for i in range(100):
	for g in range(len(out) - 2, -1, -1):
		if out[g] > out[g + 1]:
			out[g] -= 1
			out[g + 1] += 1
for i in range(100):
	for g in range(len(out) - 2, -1, -1):
		cor(g)
n = 0
data = list(data)
m = max(out)
print(len(out), m)
for i in range(len(out)):
	print(*data[n:n + out[i]], '*' * (m - len(data[n:n + out[i]])), sep='')
	n += out[i]


import sys
s = input()
st = (len(s) + 20 - 1) // 20
a = (len(s) + st - 1) // st
b = len(s) % st
b = a * st - len(s)
ans = []
if b == 0:
	for i in range(b, st):
		ans.append(s[i * a:i * a + a])
else:
	for i in range(b):
		ans.append(s[i * (a - 1):i * (a - 1) + a - 1] + '*')
	for i in range(b, st):
		ans.append(s[i * a - b:i * a + a - b])
print(len(ans), a)
for i in ans:
	print(*i, sep='')


n = input()
l = len(n)
a = (l - 1) // 20 + 1
b = (l - 1) // a + 1
print(a, b)
k = a * b - l
for i in range(k):
	print(n[(b - 1) * i:(b - 1) * (i + 1)] + '*')
m = (b - 1) * k
for i in range(a - k):
	print(n[b * i + m:b * (i + 1) + m])


def star(number):
	if stroka - number > zv:
		return False
	else:
		return True
s = input()
stroka = (len(s) - 1) // 20 + 1
for i in range(stroka):
	dl = len(s) + i
	if dl % stroka == 0:
		break
stolbec = dl // stroka
print(stroka, stolbec)
zv = dl - len(s)
k = 0
for i in range(stroka):
	print(s[0 + stolbec * i - 1 * k:stolbec - 1 * k + stolbec * i - 1 * star(i)] + '*' * star(i))
	if star(i):
		k += 1


w = input()
a = 5
b = 20
l = len(w)
y = 0
x = 0
k1 = 0
k = 0
c1 = 0
m = ''
if l % b == 0:
	y = l // b
	x = b
else:
	y = l // b + 1
	if l % y == 0:
		x = l // y
	else:
		x = (l - l % y) // y + 1
		c1 = x * y - l
print(y, x)
if c1 // y == 0:
	k = c1
else:
	k1 = c1 // y
	k = c1 % y
for i in range(y):
	if k1 == 0:
		if k == 0:
			m = w[:x]
			w = w[x:]
		else:
			m = w[:x - 1] + '*'
			k -= 1
			w = w[x - 1:]
	elif k == 0:
		m = w[:x - k1] + '*' * k1
		w = w[x - k1:]
	else:
		m = w[:x - k1 - 1] + '*' * (k1 + 1)
		k -= 1
		w = w[x - k1 - 1:]
	print(m)


from math import ceil
s = input()
l = len(s)
h = ceil(l / 20)
w = ceil(l / h)
print(h, w)
st_p_y = w * h - l
st = 0
i = 0
for y in range(h):
	st += st_p_y
	for x in range(w):
		if st >= h:
			st -= h
			print('*', end='')
		else:
			print(s[i], end='')
			i += 1
	print()


N = input()
K = len(N) // 20 + (1 if len(N) % 20 != 0 else 0)
m = len(N) // K + (1 if len(N) % K != 0 else 0)
d = m * K - len(N)
temp = d // K
data = [temp for i in range(K)]
d -= temp * K
i = 0
while d > 0:
	data[i % K] += 1
	d -= 1
	i += 1
sum = 0
print(K, m)
for i in range(K):
	k = m - data[i]
	print(N[sum:sum + k] + '*' * data[i])
	sum += k


s = input()
l = len(s)
ans = []

def place(x, y, s):
	temps = s
	todostars = x * y - len(s)
	ans = ['' for _ in range(x)]
	while todostars != 0:
		for i in range(x):
			ans[i] += '*'
			todostars -= 1
			if todostars == 0:
				break
	for i in range(x):
		lentodo = y - len(ans[i])
		ans[i] += temps[:lentodo]
		temps = temps[lentodo:]
	print('\n'.join(ans))
for columns in range(1, 6):
	for rows in range(1, 21):
		x = columns * rows - len(s)
		ans.append(x)
		if x >= 0:
			print(columns, rows)
			place(columns, rows, s)
			exit()


from math import ceil
a = input()
c = ceil(len(a) / 20)
d = ceil(len(a) / c)
d2 = d * c - len(a)
s = 0
s2 = d
s3 = c - d2
print(str(c) + ' ' + str(d))
for i in range(c):
	if i >= s3:
		print('*', end='')
		print(a[s:s2 - 1], end='')
		(s, s2) = (s2 - 1, s2 + d - 1)
	else:
		print(a[s:s2], end='')
		(s, s2) = (s2, s2 + d)
	print()


s = input()
for i in range(1, 6):
	for j in range(1, 21):
		if len(s) > i * j:
			continue
		y = i * j - len(s)
		z = y % i
		p = y // i
		start = 0
		print(i, j)
		for k in range(i):
			a = j - p
			print('*' * p, end='')
			if z > 0:
				print('*', end='')
				z -= 1
				a -= 1
			print(s[start:start + a])
			start += a
		exit()


s = input()
n = len(s)
l = []
k = (n - 1) // 20 + 1
v = (n + k - 1) // k
qw = []
for i in range(0, n):
	qw.append(s[i])
for i in range(0, abs(n - v * k)):
	qw.insert((i + 1) * v + 1, '*')
s = ''
for elem in qw:
	s = s + elem
kl = []
for i in range(0, k):
	l.append(s[i * v:(i + 1) * v])
	kl.append((i + 1) * v)
ma = float('-inf')
for elem in l:
	if len(elem) > ma:
		ma = len(elem)
for i in range(0, len(l)):
	if len(l[i]) < ma:
		l[i] = l[i] + '*'
print(len(l), ma)
for elem in l:
	print(elem)


s = input()
for i in range(5, 0, -1):
	if (len(s) + i - 1) // i <= 20:
		x = i
print(x, (len(s) + x - 1) // x)
a = ''
for i in range(x):
	a += s[:len(s) // x] + ((len(s) - 1) // x + 1 - len(s) // x) * '*' + '\n'
	s = s[len(s) // x:]
	x -= 1
print(a)


s = input()
stroki = len(s) // 20 + 1
if len(s) <= 20:
	print(1, len(s))
	print(s)
	exit()
if len(s) % 20 == 0:
	stroki = len(s) // 20
	count = len(s) // stroki
	print(stroki, count)
	for i in range(stroki - 1):
		print(s[count * i:count * (i + 1)])
	print(s[count * (i + 1):])
	exit()
if len(s) % stroki == 0:
	count = len(s) // stroki
	print(stroki, count)
	for i in range(stroki - 1):
		print(s[count * i:count * (i + 1)])
	print(s[count * (i + 1):])
	exit()
count = len(s) // stroki
countx = (count + 1) * stroki - len(s)
print(stroki, count + 1)
i = 0
p = ''
for i in range(stroki - 1):
	if countx > 0:
		p += s[count * i:count * (i + 1)] + '*'
	else:
		p += s[count * i:count * (i + 1)]
	countx -= 1
p += s[count * (i + 1):]
for i in range(stroki):
	print(p[count * i + i:count * (i + 1) + i + 1])


import math
s = input()
a = math.ceil(len(s) / 20)
b = math.ceil(len(s) / a)
d = a * b - len(s)
ind = 0
while d > 0:
	s = s[:ind] + '*' + s[ind:]
	ind += b
	if ind >= len(s):
		ind = 0
	d -= 1
print(a, b)
for i in range(a):
	print(s[i * b:(i + 1) * b])


h = input()
a = len(h)
b = a // 20
if a % 20 != 0:
	b += 1
print(b, end=' ')
c = a // b
d = a % b
if d != 0:
	c += 1
print(c)
d = b * c - a
e = 0
for i in range(b):
	for u in range(c):
		if d != 0 and u == 0:
			print('*', end='')
			e += 1
			d -= 1
		else:
			print(h[i * c + u - e], end='')
		if u == c - 1:
			print()


import math
S = input()
a = math.ceil(len(S) / 20)
b = math.ceil(len(S) / a)
starscount = a * b - len(S)
print(a, b)
k = 0
for i in range(a - starscount):
	print(S[b * i:b * i + b])
for i in range(a - starscount, a - 1):
	print(S[b * i - k:b * i + b - k - 1] + '*')
	k += 1
if starscount > 0:
	print(S[len(S) - b + 1:len(S)] + '*')


s = input()
n = len(s)
for i in range(6, 0, -1):
	if (n - 1) // i + 1 <= 20:
		k = i
ans = []
for i in range(20, 0, -1):
	if k * i >= n:
		kk = i
ost = k * kk - n
nost = k - ost
for i in range(nost):
	ans.append(s[:kk])
	s = s[kk:]
for i in range(ost):
	ans.append('*' + s[:kk - 1])
	s = s[kk - 1:]
print(k, kk)
for i in range(len(ans)):
	print(ans[i])


from math import ceil
s = input()
l = len(s)
a = 1
b = 1
for a in range(1, 6):
	b = ceil(l / a)
	if b <= 20:
		break
print(a, b)
k = a * b - l
q = 0
u = b
if k == 0:
	for y in range(a):
		print(s[q:u])
		q = u
		u += b
elif k > a:
	m = ceil(k / a)
	h = m - 1
	r = m * a - k
	t = a - r
	for i in range(r):
		print(s[q:u - h], h * '*', sep='')
		q += u - h
		u += b - 1
	for j in range(t):
		print(s[q:u - t], t * '*', sep='')
		q += u - t
		u += b - 1
elif k < a:
	for g in range(k):
		print(s[q:u - 1], '*', sep='')
		q = u - 1
		u += b - 1
	for v in range(a - k):
		print(s[q:q + b])
		q += b


from math import ceil
s = input()
n = len(s)
for x in range(1, 6):
	p = ceil(n / x)
	if p > 20:
		continue
	r = x * p - n
	k = r // x
	ll = r % x
	print(x, p)
	cnt = 0
	for mn in range(x):
		st = ''
		if ll > 0:
			for i in range(p - k - 1):
				st += s[cnt]
				cnt += 1
			for i in range(k):
				st += '*'
			st += '*'
			ll -= 1
		else:
			for i in range(p - k):
				st += s[cnt]
				cnt += 1
			for i in range(k):
				st += '*'
		print(st)
	break


s = input()
a = (len(s) + 19) // 20
b = (len(s) + a - 1) // a
print(a, b)
li = 0
for i in range(a):
	if len(s) % a == 0 or i < len(s) % a:
		print(s[li:li + b])
		li += b
	else:
		print('*{}'.format(s[li:li + b - 1]))
		li += b - 1


s = input()
ln = len(s)
if len(s) < 21:
	print(1, ln)
	print(s)
else:
	i = 2
	while i < 6:
		if -(-ln // i) < 21:
			break
		i += 1
	stolb = -(-ln // i)
	zv = -ln % i
	print(i, stolb)
	k = 0
	for j in range(i):
		if j < zv % i:
			print(s[k:k - 1 + stolb - zv // i] + '*' * (zv // i) + '*')
			k += stolb - 1 - zv // i
		else:
			print(s[k:k + stolb - zv // i] + '*' * (zv // i))
			k += stolb - zv // i


string = input()
s = len(string)
for a in range(1, 6):
	if s / a <= 20:
		b = abs(-s // a)
		st = a * b - s
		break
i = 0
print(a, b)
for m in range(a):
	print(str(string[i:i + b - bool(st)]) + bool(st) * '*')
	i += b - bool(st)
	st -= bool(st)


from math import ceil
s = input()[:100]
k = len(s)
n = int(ceil(k / 20))
m = int(ceil(k / n))
z = n * m - k
l = z % n
r = l
if l:
	g = 1
else:
	g = 0
print(n, m)
h = 0
for i in range(n):
	if l != 0:
		print(s[h:(i + 1) * m - g * (r - l + 1)] + '*')
		h = (i + 1) * m - g * (r - l + 1)
		l -= 1
	else:
		print(s[h:(i + 1) * m - g * r])
		h = (i + 1) * m - g * r


a = input()
k = -1
tot = -1
rows = -1
cols = -1
fl = False
for i in range(1, 5 + 1):
	for j in range(1, 20 + 1):
		if i * j >= len(a):
			(rows, cols) = (i, j)
			fl = True
			break
	if fl:
		break
ast = i * j - len(a)
ast_pl = min(ast, ast // rows)
ast_rows = [0, 0, 0, 0, 0, 0]
cur = 0
while ast > 0:
	ast_rows[cur] += 1
	cur += 1
	cur %= rows
	ast -= 1
tot = 0
tmp = ''
print(rows, cols)
cur = 0
if ast_rows[cur] > 0:
	tmp = '*' * ast_rows[cur]
for i in a:
	tmp += i
	if len(tmp) >= cols:
		print(tmp)
		cur += 1
		if ast_rows[cur] > 0:
			tmp = '*' * ast_rows[cur]
		else:
			tmp = ''
		tot = 0
if len(tmp) > 0:
	print(tmp)


from math import ceil
s = input()
n = len(s)
b = 0
a = ceil(n / 20)
b = ceil(n / a)
k = a * b - n
c = [0] * a
for i in range(a):
	c[i] = k // (a - i)
	k -= k // (a - i)
print(a, b)
q = 0
for i in range(a):
	print(s[b * i - q:b * (i + 1) - c[i] - q], '*' * c[i], sep='')
	q += c[i]


import math
s = input()
dl = len(s)
a = 0
b = 0
for n_str in range(1, 6):
	b = math.ceil(dl / n_str)
	if b <= 20:
		a = n_str
		break
zv = a * b - dl
i = 0
zvs = []
for j0 in range(a):
	zvs.append(0)
while zv > 0:
	zvs[i] += 1
	zv -= 1
	i = (i + 1) % a
stroki = []
for j1 in range(a):
	ss = s[:b - zvs[j1]] + '*' * zvs[j1]
	stroki.append(ss)
	s = s[b - zvs[j1]:]
print(a, b)
for j2 in stroki:
	print(j2)


s = input()
n = len(s)
y = (n - 1) // 20 + 1
x = (n - 1) // y + 1
z = x * y - n
ss = []
print(y, x)
for i in range(y):
	if z > 0:
		ss.append(s[:x - 1] + '*')
		s = s[x - 1:]
		z -= 1
	else:
		ss.append(s[:x])
		s = s[x:]
for i in ss:
	print(i)


s = input()
h = len(s)
for i in range(1, 6):
	if h % i == 0:
		p = h
		if h // i <= 20:
			break
	if h % i != 0:
		p = h + 1
		if h // i + 1 <= 20:
			break
j = i
z = 0
while len(s) % j != 0:
	s = s + ' '
	z += 1
u = len(s) // j
for i in range(z):
	s = s[:i * u] + '*' + s[i * u:]
print(j, u)
for x in range(j):
	print(s[x * u:(x + 1) * u])


import math
row_max = 5
col_max = 20
handle = input()
row_num = min(row_max, math.ceil(len(handle) / col_max))
col_num = math.ceil(len(handle) / row_num)
asterisk_needed = row_num * col_num % len(handle)
start = 0
print(row_num, col_num)
for r in range(row_num):
	stop = min(start + col_num, len(handle))
	line = ''
	if asterisk_needed > 0:
		stop -= 1
		line += '*'
		asterisk_needed -= 1
	line += handle[start:stop]
	start = stop
	print(line)


a = input()
b = len(a)
k = b // 20
if b % 20 != 0:
	k += 1
l = b // k
if b % k != 0:
	l += 1
q = l * k - b
A = []
v = 0
if q != 0:
	t = l - 1
else:
	t = l
for i in range(k):
	if q != 0:
		A.append(a[v:t] + '*')
		q -= 1
		v = t
		t += l
		if q != 0:
			t -= 1
	else:
		A.append(a[v:t])
		v = t
		t += l
print(k, l)
for i in range(k):
	for j in range(l):
		print(A[i][j], end='')
	print()


s = input()
m1 = 5
m2 = 20
for r_n in range(1, m1 + 1):
	if len(s) > m2 * r_n:
		continue
	d = len(s) // r_n
	s1 = []
	for i in range(r_n):
		s1.append(s[i * d:i * d + d])
	left = s[-(len(s) - d * r_n):]
	if len(s) - d * r_n == 0:
		left = ''
	for i in range(r_n):
		if len(left) != 0:
			s1[i] += left[0]
			left = left[1:]
	mx = len(s1[0])
	print(r_n, mx)
	prev = 0
	for i in range(r_n):
		for j in range(len(s1[i])):
			print(s[prev], end='')
			prev += 1
		print('*' * (mx - len(s1[i])))
	exit(0)


(s, a) = (input(), 0)
for i in range(5, 0, -1):
	if len(s) // i + (len(s) % i != 0) < 21:
		a = i
(x, y, b) = (len(s) % a, 0, len(s) // a)
print(a, b + (x != 0))
for i in range(a):
	print(s[b * i + y:b * i + y + b + (x != 0)], end='')
	print('' if x != 0 else '*' * (len(s) % a != 0))
	if x != 0:
		x -= 1
		y += 1


from math import ceil
from time import sleep
s = input()
a = 20
l = len(s)
b = ceil(l / a)
x = 20 - l % a
if x == 20:
	x = 0
while x >= b:
	x -= b
	a -= 1
answer = []
index1 = 0
for i in range(b - x):
	answer.append(s[index1:index1 + a])
	index1 += a
for i in range(x):
	answer.append(s[index1:index1 + a - 1] + '*')
	index1 += a - 1
print(b, a)
for line in answer:
	print(*line, sep='')


s = input()
flag = True
i = 1
while i <= 6 and flag:
	for j in range(1, 21):
		if i * j >= len(s):
			if len(s) % i == 0 or i > j - len(s) + j * (i - 1):
				print(i, j)
				(a, b) = (i, j)
				flag = False
				break
	i += 1
x = a * b - len(s)
k = 0
for i in range(a):
	if x > 0:
		ans = s[k:k + b - 1] + '*'
		k += b - 1
		x -= 1
	else:
		ans = s[k:k + b]
		k += b
	print(ans)


s = input()
l = len(s)
a = (l + 19) // 20
b = (l + a - 1) // a
print(a, b)
x = a * b - l
k = 0
for i in range(a - x):
	print(s[k:k + b])
	k += b
for i in range(x):
	print(s[k:k + b - 1], end='*')
	print()
	k += b - 1


s = input()
a = 0
n = len(s)
while n > 0:
	n -= 20
	a += 1
if a == 1:
	print(1, len(s))
	print(s)
	exit()
b = len(s) // a
if b * a != len(s):
	b += 1
zw = b * a - len(s)
id = 0
print(a, b)
for i in range(a):
	for j in range(b - 1):
		print(s[id], end='')
		id += 1
	if zw > 0:
		print('*')
		zw -= 1
	else:
		print(s[id])
		id += 1


from math import ceil
s = input()
n = len(s)
a = ceil(n / 20)
b = ceil(n / a)
stars = b - (n - (a - 1) * b)
print(a, b)
cnt = 0
for i in range(n):
	if cnt < b - 1 and stars > 0:
		print(s[i], end='')
		cnt += 1
	elif cnt == b - 1 and stars > 0:
		print('*')
		stars -= 1
		print(s[i], end='')
		cnt = 1
	elif cnt < b - 1 and stars == 0:
		print(s[i], end='')
		cnt += 1
	elif cnt == b - 1 and stars == 0:
		print(s[i])
		cnt = 0


s = input()
x = len(s)
strings = x // 20 + (x % 20 > 0)
print(strings, end=' ')
b = 0
while b * strings < x:
	b += 1
print(b)
stars = strings * b - x
new = ''
ind = 0
for i in range(strings * b):
	if i % b == 0 and stars > 0:
		new += '*'
		stars -= 1
	else:
		new += s[ind]
		ind += 1
last = 0
for i in range(b, b * strings + 1, b):
	print(new[last:i])
	stars -= 1
	last = i


s = input()
if len(s) <= 20:
	print('1 ' + str(len(s)))
	print(s)
elif len(s) % 20 == 0:
	row = len(s) // 20
	print(row, end=' ')
	print(20)
	curI = 0
	while curI < len(s):
		print(s[curI:curI + 20])
		curI += 20
	curI += 20
else:
	row = len(s) // 20 + 1
	lenR = len(s) // row
	extra = len(s) % lenR
	if extra == 0:
		c = 0
	else:
		c = 1
	print(str(row) + ' ' + str(lenR + c))
	curI = 0
	while curI < len(s):
		if extra > 0:
			print(s[curI:curI + lenR + 1])
			extra -= 1
			curI += lenR + 1
		elif len(s) % lenR != 0:
			print(s[curI:curI + lenR] + '*')
			curI += lenR
		else:
			print(s[curI:curI + lenR])
			curI += lenR


def okr(n):
	if n == int(n):
		return int(n)
	else:
		return int(n) + 1
s = input()
n = okr(len(s) / 20)
m = okr(len(s) / n)
print(n, m)
zv = n * m - len(s)
i = 0
for k in range(n - zv):
	print(s[i:i + m])
	i += m
for k in range(zv):
	print(s[i:i + m - 1] + '*')
	i += m - 1


a = input()
row = (len(a) + 19) // 20
col = (len(a) + row - 1) // row
n = col * row - len(a)
print(row, col)
for i in range(row - n):
	print(a[:col])
	a = a[col:]
for i in range(n):
	print(a[:col - 1] + '*')
	a = a[col - 1:]


s = input()
n = len(s)
strok = (n + 19) // 20
stolb = (n + strok - 1) // strok
arr = [stolb] * strok
i = 0
while sum(arr) != n:
	arr[i] -= 1
	i += 1
arr.reverse()
ans = []
for i in range(len(arr)):
	ans.append(s[:arr[i]] + '*' * (stolb - arr[i]))
	s = s[arr[i]:]
print(strok, stolb)
for i in ans:
	print(i)


a = input()
b = ''
b = a
h = len(a) // 20
if len(a) % 20 > 0:
	h += 1
finals = ['' for i in range(h)]
l = len(a) // h
if len(a) % h > 0:
	l += 1
p = 0
while len(a) < h * l:
	a = a[0:p] + '*' + a[p:]
	p += l + 1
print(h, l)
for i in range(h):
	finals[i] = a[:l]
	a = a[l:]
for i in range(h):
	print(finals[i])


s = input()
l = len(s)
k = l - 1
a = k // 20 + 1
b = k // a + 1
print(a, b)
t = iter(s)
c = a * b
if c != l:
	d = a * b - l
	e = b - 1
	for _ in range(d):
		print('*' + ''.join((y for (x, y) in zip(range(e), t))))
	a -= d
for __ in range(a):
	print(''.join((y for (z, y) in zip(range(b), t))))


name = input()
dlin = len(name)
if dlin <= 20:
	print('1 {0}\n{1}'.format(dlin, name))
else:
	stroki = (dlin + 19) // 20
	stolbi = (dlin + stroki - 1) // stroki
	stars = stroki * stolbi - dlin
	print('{0} {1}'.format(stroki, stolbi))
	if stars == 0:
		perehod = 0
		for i in range(dlin):
			perehod += 1
			print(name[i], end='')
			if perehod == stolbi:
				perehod = 0
				print()
	elif stars == 1:
		perehod = 0
		for i in range(dlin):
			perehod += 1
			print(name[i], end='')
			if perehod == stolbi:
				perehod = 0
				print()
		print('*')
	elif stars == 2:
		perehod = 1
		print('*', end='')
		for i in range(dlin):
			perehod += 1
			print(name[i], end='')
			if perehod == stolbi:
				perehod = 0
				print()
		print('*')
	elif stars == 3:
		perehod = 1
		print('*', end='')
		stars = 1
		in_this = True
		for i in range(dlin):
			perehod += 1
			if stars > 0 and (not in_this):
				print('*', end='')
				perehod += 1
				stars -= 1
				in_this = True
			print(name[i], end='')
			if perehod == stolbi:
				perehod = 0
				print()
				in_this = False
		print('*')
	elif stars == 4:
		perehod = 1
		print('*', end='')
		stars = 2
		in_this = True
		for i in range(dlin):
			perehod += 1
			if stars > 0 and (not in_this):
				print('*', end='')
				perehod += 1
				stars -= 1
				in_this = True
			print(name[i], end='')
			if perehod == stolbi:
				perehod = 0
				print()
				in_this = False
		print('*')


import math
r = input()
k = 0
sum = 0
count = 1
x = 0
q = ''
if len(r) <= 20:
	print(count, math.ceil(len(r) / count))
	print(r)
else:
	for i in range(1, 6):
		if math.ceil(len(r) / i) <= 20:
			count = p = i
			break
	print(count, math.ceil(len(r) / count))
	for i in range(abs(len(r) - math.ceil(len(r) / p) * p)):
		sum = sum + math.ceil(len(r) / p) - 1
		print(r[k:sum] + '*')
		k = sum
	for i in range(count - abs(len(r) - math.ceil(len(r) / p) * p)):
		sum = sum + math.ceil(len(r) / p)
		print(r[k:sum])
		k = sum


s = input()
l = len(s)
if l % 20 == 0:
	b = l // 20
else:
	b = l // 20 + 1
a = 1
while a * b < l:
	a += 1
v = [0] * b
z = a * b - l
for i in range(z):
	v[i % b] += 1
k = 0
print(b, a)
for i in range(b):
	print('*' * v[i] + s[:a - v[i]], end='')
	s = s[a - v[i]:]
	print()


s = input()
if len(s) <= 20:
	print(1, len(s))
	print(s)
	exit(0)
l = len(s)
for rows in range(1, 6):
	md = sum([i + 1 for i in range(rows)])
	for colums in range(1, 21):
		if rows * colums // l >= 1 and rows * colums % l < md:
			d = rows * colums % l
			stars_placed = 0
			print(rows, colums)
			stars_in_row = d // rows
			left_stars = d % rows
			for i in range(rows):
				flag = False
				for j in range(colums):
					if j < stars_in_row:
						print('*', end='')
						stars_placed += 1
					elif left_stars and (not flag):
						print('*', end='')
						left_stars -= 1
						stars_placed += 1
						flag = True
					else:
						print(s[i * colums + j - stars_placed], end='')
				print()
			exit(0)


import math
s = input()
l = len(s)
a = 1
while math.ceil(l / a) > 20:
	a += 1
b = math.ceil(l / a)
print(str(a) + ' ' + str(b))
sw = '*' * math.ceil(a * b - l)
swb = []
for k in range(a):
	swb.append(sw[:b - l // a])
	sw = sw[b - l // a:]
for i in range(a):
	print(s[:b - len(swb[i])] + swb[i])
	s = s[b - len(swb[i]):]


from math import ceil
s0 = input()
start = 0
end = 0
if len(s0) <= 20:
	print(1, len(s0))
	print(s0)
else:
	for i in range(2, 6):
		lens = [ceil(len(s0) / i)]
		strings = []
		l0 = len(s0)
		a = i
		k = i
		for j in range(1, i):
			l0 -= lens[j - 1]
			k -= 1
			lens.append(ceil(l0 / k))
		b = lens[0]
		if max(lens) > 20:
			continue
		else:
			for j in range(i):
				p = ''
				end += lens[j]
				if lens[0] > lens[j]:
					p = '*'
				strings.append(s0[start:end] + p)
				start += lens[j]
			print(a, b)
			print(*strings, sep='\n')
			break


s = input()
if len(s) % 20 == 0:
	a = len(s) // 20
else:
	a = len(s) // 20 + 1
count = 20
while count * a > len(s):
	count -= 1
if count * a < len(s):
	count += 1
c = count * a - len(s)
print(a, count)
for i in range(a):
	if c > 0:
		print(s[:count - 1] + '*')
		s = s[count - 1:]
		c -= 1
	else:
		print(s[:count])
		s = s[count:]


name = input()
l = len(name)
a = (l + 19) // 20
b = (l + a - 1) // a
frsp = a * b - l
print(a, b)
temp = 0
for i in range(a):
	if frsp != 0:
		for j in range(b - 1):
			print(name[temp + j], sep='', end='')
		print('*')
		frsp -= 1
		temp += j + 1
	else:
		for j in range(b):
			print(name[temp + j], sep='', end='')
		print('')
		temp += j + 1


s = input()
l = len(s)
ncol = 20
nrow = 1
while l > 20 * nrow:
	nrow += 1
while nrow * (ncol - 1) >= l:
	ncol -= 1
nast = ncol * nrow - l
print(nrow, ncol)
while nrow:
	nrow -= 1
	temp = ncol
	z = 0
	if nast > 0:
		nast -= 1
		temp -= 1
		z += 1
	print(s[:temp] + '*' * z)
	s = s[temp:]


import math
s = input()
n = len(s)
a = math.ceil(n / 20)
ost = abs(n - 20 * a)
b = 20 - ost // a
ost %= a
print(a, b)
counter = 0
for i in range(a):
	if ost == 0:
		for j in range(b):
			print(s[counter], end='')
			counter += 1
		print()
	else:
		for j in range(b - 1):
			print(s[counter], end='')
			counter += 1
		print('*')
		ost -= 1


s = input()
if len(s) <= 20:
	print(1, len(s))
	print(s)
elif (len(s) + 1) // 2 <= 20:
	print(2, (len(s) + 1) // 2)
	k = len(s) % 2
	if k == 1:
		print('*' + s[:len(s) // 2])
		print(s[len(s) // 2:])
	else:
		print(s[:len(s) // 2])
		print(s[len(s) // 2:])
elif (len(s) + 2) // 3 <= 20:
	print(3, (len(s) + 2) // 3)
	k = len(s) % 3
	if k == 2:
		print('*' + s[:len(s) // 3])
		print(s[len(s) // 3:2 * len(s) // 3])
		print(s[2 * len(s) // 3:])
	elif k == 1:
		print('*' + s[:len(s) // 3])
		print(s[len(s) // 3:2 * len(s) // 3 + 1])
		print(s[2 * len(s) // 3 + 1:] + '*')
	else:
		print(s[:len(s) // 3])
		print(s[len(s) // 3:2 * len(s) // 3])
		print(s[2 * len(s) // 3:])
elif (len(s) + 3) // 4 <= 20:
	print(4, (len(s) + 3) // 4)
	k = len(s) % 4
	if k == 3:
		print('*' + s[:len(s) // 4])
		print(s[len(s) // 4:len(s) // 2])
		print(s[len(s) // 2:3 * len(s) // 4])
		print(s[3 * len(s) // 4:])
	if k == 2:
		print('*' + s[:len(s) // 4])
		print(s[len(s) // 4:len(s) // 2])
		print(s[len(s) // 2:3 * len(s) // 4 + 1])
		print(s[3 * len(s) // 4 + 1:] + '*')
	if k == 1:
		print('*' + s[:len(s) // 4])
		print('*' + s[len(s) // 4:len(s) // 2])
		print(s[len(s) // 2:3 * len(s) // 4 + 1])
		print(s[3 * len(s) // 4 + 1:] + '*')
	if k == 0:
		print(s[:len(s) // 4])
		print(s[len(s) // 4:len(s) // 2])
		print(s[len(s) // 2:3 * len(s) // 4])
		print(s[3 * len(s) // 4:])
elif (len(s) + 4) // 5 <= 20:
	print(5, (len(s) + 4) // 5)
	k = len(s) % 5
	if k == 4:
		print('*' + s[:len(s) // 5])
		print(s[len(s) // 5:2 * len(s) // 5])
		print(s[2 * len(s) // 5:3 * len(s) // 5])
		print(s[3 * len(s) // 5:4 * len(s) // 5])
		print(s[4 * len(s) // 5:])
	if k == 3:
		print('*' + s[:len(s) // 5])
		print(s[len(s) // 5:2 * len(s) // 5])
		print(s[2 * len(s) // 5:3 * len(s) // 5 + 1])
		print(s[3 * len(s) // 5 + 1:4 * len(s) // 5 + 1])
		print(s[4 * len(s) // 5 + 1:] + '*')
	if k == 2:
		print('*' + s[:len(s) // 5])
		print('*' + s[len(s) // 5:2 * len(s) // 5])
		print(s[2 * len(s) // 5:3 * len(s) // 5])
		print(s[3 * len(s) // 5:4 * len(s) // 5 + 1])
		print(s[4 * len(s) // 5 + 1:] + '*')
	if k == 1:
		print('*' + s[:len(s) // 5])
		print('*' + s[len(s) // 5:2 * len(s) // 5])
		print(s[2 * len(s) // 5:3 * len(s) // 5] + '*')
		print(s[3 * len(s) // 5:4 * len(s) // 5 + 1])
		print(s[4 * len(s) // 5 + 1:] + '*')
	if k == 0:
		print(s[:len(s) // 5])
		print(s[len(s) // 5:2 * len(s) // 5])
		print(s[2 * len(s) // 5:3 * len(s) // 5])
		print(s[3 * len(s) // 5:4 * len(s) // 5])
		print(s[4 * len(s) // 5:])


s = input()
n = len(s)
if n <= 20:
	print(1, n)
	print(s)
else:
	a = (n - 1) // 20 + 1
	b = (n - 1) // a + 1
	print(a, b)
	if n % b == 0:
		l = a
		m = 0
	else:
		m = b - n % b
		l = a - m
	st = 0
	for i in range(l):
		print(s[st:st + b])
		st += b
	for i in range(m):
		print(s[st:st + b - 1] + '*')
		st += b - 1


s = input()
for a in range(1, 6):
	for b in range(1, 21):
		if len(s) > a * b:
			continue
		if a * b - len(s) >= a:
			continue
		print(a, b)
		i = a - (a * b - len(s))
		while s:
			if i != 0:
				print(s[:b])
				s = s[b:]
				i -= 1
			else:
				print(s[:b - 1] + '*')
				s = s[b - 1:]
		exit(0)


winner = input()
height = 1
width = 1
s = 1
length = len(winner)
while s < length:
	width += 1
	if width == 21:
		height += 1
		width = 0
	s = width * height
print(height, width)
needed = s - length
end = width
for i in range(height):
	isit = 0
	if needed > 0:
		print('*', end='')
		end -= 1
		needed -= 1
		isit = 1
	print(winner[:end])
	winner = winner[end:]
	if isit == 1:
		end += 1


st = input()
n = len(st)
flag = False
for i in range(1, 6):
	if flag:
		break
	for j in range(1, 21):
		if i * j >= n:
			if n % i == 0 or j - (n - (i - 1) * j) < i:
				print(i, j)
				a = i
				b = j
				flag = True
				break
dop = a * b - n
kon = 0
for i in range(a):
	if dop > 0:
		strout = st[kon:kon + b - 1] + '*'
		kon = kon + b - 1
		dop -= 1
	else:
		strout = st[kon:kon + b]
		kon = kon + b
	print(strout)


a = input().replace('', ' ').split()
b = len(a)
n = (b + 19) // 20
s = b // n
z = b % n
f = (b + n - 1) // n
r = []
for i in range(n):
	k = ''
	o = s
	if z:
		o += 1
		z -= 1
	for j in range(o):
		k += a.pop(0)
	r += [k + ('*' if f != o else '')]
print(n, f)
[print(i) for i in r]


n = input()
longi = len(n)
a = (longi - 1) // 20 + 1
b = (longi - 1) // a + 1
print(a, b)
k = a * b - longi
for i in range(k):
	left = (b - 1) * i
	right = (b - 1) * (i + 1)
	print(n[left:right] + '*')
m = (b - 1) * k
for i in range(a - k):
	print(n[b * i + m:b * (i + 1) + m])


import math
import sys
x = input()
count = math.ceil(len(x) / 20)
ccount = math.ceil(len(x) / count)
print(count, ccount)
wq = 0
check = ccount - (len(x) - (count - 1) * ccount)
if check != -1:
	t = ccount
	ccount -= 1
	for i in range(count):
		if check != 0:
			print(x[wq:wq + ccount] + '*')
			check -= 1
			wq += ccount
		else:
			ccount = t
			print(x[wq:wq + ccount])
			wq += ccount


name = input()
l = len(name)
A = 5
B = 20
n = (l + B - 1) // B
lns = []
mpx = 0

def get(u):
	global name, mpx
	v = name[:u]
	name = name[u:]
	mpx = max(mpx, u)
	return v
for x in range(0, n):
	u = n - x
	v = (len(name) + u - 1) // u
	lns.append(get(v))
lns = [x + '*' * (mpx - len(x)) for x in lns]
print(n, mpx)
for x in lns:
	print(x)


s = input()
a = (len(s) + 19) // 20
b = (len(s) + (a - 1)) // a
z = a * b - len(s)
z_s = z // a
ds_z = z % a
print(a, b)
fe = 0
for i in range(a):
	le = fe + b - z_s
	if ds_z > 0:
		le -= 1
		ds_z -= 1
	print('{0:*<{b}}'.format(s[fe:le], b=b))
	fe = le


s = input()
i = 1
while i <= 5:
	j = 1
	while j <= 20:
		if i * j >= len(s):
			print(i, j)
			dif = i * j - len(s)
			cel = dif // i
			ost = dif % i
			k = 1
			while k <= i:
				if k <= ost:
					print('*' * (cel + 1) + s[0:j - cel - 1])
					s = s[j - cel - 1:len(s)]
				else:
					print('*' * cel + s[0:j - cel])
					s = s[j - cel:len(s)]
				k += 1
			exit(0)
		j += 1
	i += 1


name = input()
if len(name) <= 20:
	print(1, len(name))
	print(name)
else:
	for i in range(2, 6):
		cols = (len(name) + i - 1) // i
		if cols <= 20:
			print(i, cols)
			stars = cols * i - len(name)
			last_ind = 0
			for i in range(i):
				if stars:
					print('*', end='')
					for j in range(cols - 1):
						print(name[j + last_ind], end='')
					last_ind += j + 1
					stars -= 1
				else:
					for j in range(cols):
						print(name[j + last_ind], end='')
					last_ind += j + 1
				print()
			break
	else:
		print(-1)


a = input()
n = int(len(a))
if n <= 20:
	print(1, n)
	print(a)
elif n <= 40:
	if n % 2 == 1:
		print(2, int((n + 1) / 2))
		print(a[:int((n + 1) / 2)])
		print(a[int((n + 1) / 2):] + '*')
	else:
		print(2, int(n / 2))
		print(a[:int(n / 2)])
		print(a[int(n / 2):])
elif n <= 60:
	if n % 3 == 1:
		print(3, int((n + 2) / 3))
		print(a[:int((n + 2) / 3)])
		print(a[int((n + 2) / 3):2 * int((n + 2) / 3) - 1] + '*')
		print(a[2 * int((n + 2) / 3) - 1:] + '*')
	elif n % 3 == 2:
		print(3, int((n + 1) / 3))
		print(a[:int((n + 1) / 3)])
		print(a[int((n + 1) / 3):2 * int((n + 1) / 3)])
		print(a[2 * int((n + 1) / 3):] + '*')
	else:
		print(3, int(n / 3))
		print(a[:int(n / 3)])
		print(a[int(n / 3):2 * int(n / 3)])
		print(a[2 * int(n / 3):])
elif n <= 80:
	if n % 4 == 1:
		print(4, int((n + 3) / 4))
		print(a[:int((n + 3) / 4)])
		print(a[int((n + 3) / 4):2 * int((n + 3) / 4) - 1] + '*')
		print(a[2 * int((n + 3) / 4) - 1:3 * int((n + 3) / 4) - 2] + '*')
		print(a[3 * int((n + 3) / 4) - 2:] + '*')
	elif n % 4 == 2:
		print(4, int((n + 2) / 4))
		print(a[:int((n + 2) / 4)])
		print(a[int((n + 2) / 4):2 * int((n + 2) / 4)])
		print(a[2 * int((n + 2) / 4):3 * int((n + 2) / 4) - 1] + '*')
		print(a[3 * int((n + 2) / 4) - 1:] + '*')
	elif n % 4 == 3:
		print(4, int((n + 1) / 4))
		print(a[:int((n + 1) / 4)])
		print(a[int((n + 1) / 4):2 * int((n + 1) / 4)])
		print(a[2 * int((n + 1) / 4):3 * int((n + 1) / 4)])
		print(a[3 * int((n + 1) / 4):] + '*')
	else:
		print(4, int(n / 4))
		print(a[:int(n / 4)])
		print(a[int(n / 4):2 * int(n / 4)])
		print(a[2 * int(n / 4):3 * int(n / 4)])
		print(a[3 * int(n / 4):])
elif n <= 100:
	if n % 5 == 1:
		print(5, int((n + 4) / 5))
		print(a[:int((n + 4) / 5)])
		print(a[int((n + 4) / 5):2 * int((n + 4) / 5) - 1] + '*')
		print(a[2 * int((n + 4) / 5) - 1:3 * int((n + 4) / 5) - 2] + '*')
		print(a[3 * int((n + 4) / 5) - 2:4 * int((n + 4) / 5) - 3] + '*')
		print(a[4 * int((n + 4) / 5) - 3:] + '*')
	if n % 5 == 2:
		print(5, int((n + 3) / 5))
		print(a[:int((n + 3) / 5)])
		print(a[int((n + 3) / 5):2 * int((n + 3) / 5)])
		print(a[2 * int((n + 3) / 5):3 * int((n + 3) / 5) - 1] + '*')
		print(a[3 * int((n + 3) / 5) - 1:4 * int((n + 3) / 5) - 2] + '*')
		print(a[4 * int((n + 3) / 5) - 2:] + '*')
	if n % 5 == 3:
		print(5, int((n + 2) / 5))
		print(a[:int((n + 2) / 5)])
		print(a[int((n + 2) / 5):2 * int((n + 2) / 5)])
		print(a[2 * int((n + 2) / 5):3 * int((n + 2) / 5)])
		print(a[3 * int((n + 2) / 5):4 * int((n + 2) / 5) - 1] + '*')
		print(a[4 * int((n + 2) / 5) - 1:] + '*')
	if n % 5 == 4:
		print(5, int((n + 1) / 5))
		print(a[:int((n + 1) / 5)])
		print(a[int((n + 1) / 5):2 * int((n + 1) / 5)])
		print(a[2 * int((n + 1) / 5):3 * int((n + 1) / 5)])
		print(a[3 * int((n + 1) / 5):4 * int((n + 1) / 5)])
		print(a[4 * int((n + 1) / 5):] + '*')
	if n % 5 == 0:
		print(5, int(n / 5))
		print(a[:int(n / 5)])
		print(a[int(n / 5):2 * int(n / 5)])
		print(a[2 * int(n / 5):3 * int(n / 5)])
		print(a[3 * int(n / 5):4 * int(n / 5)])
		print(a[4 * int(n / 5):])


n = input().strip()

def make(s, i, j):
	cnt = i * j - len(s)
	cnt2 = cnt // i
	req = cnt % i
	out = ''
	for k in range(i):
		if req:
			add = 1
		else:
			add = 0
		out += s[:j - cnt2 - add] + '*' * (cnt2 + add) + '\n'
		s = s[j - cnt2 - add:]
		if req:
			req -= 1
	return out
for i in range(1, 6):
	j = len(n) // i + (1 if len(n) % i else 0)
	if j <= 20:
		print(i, j)
		print(make(n, i, j))
		break


s = input()
n = len(s)
kol = -(-n // 20)
sym = n
while sym % kol != 0:
	sym += 1
rud = sym // kol
N = sym - n
print(kol, rud)
i = 0
j = 0
while i < sym:
	if i % rud == rud - 1:
		if N != 0:
			print('*')
			i += 1
			N -= 1
		else:
			print(s[j])
			i += 1
			j += 1
	else:
		print(s[j], end='')
		i += 1
		j += 1


s = input()
for i in range(6):
	for j in range(21):
		if i * j < len(s):
			continue
		a = i * j - len(s)
		b = a % i
		c = a // i
		print(str(i) + ' ' + str(j))
		(indus, cus) = (0, 0)
		for l in range(i):
			if b:
				print('*', end='')
				b -= 1
				cus += 1
			for k in range(c):
				print('*', end='')
				cus += 1
			while cus < j:
				print(s[indus], end='')
				indus += 1
				cus += 1
			print(' ')
			cus = 0
		exit(0)


s = input()
n = len(s)
(a, b) = (100, 100)
for i in range(6):
	for j in range(21):
		if -1 < i * j - n <= i * (i + 1) / 2 and (i, j) < (a, b):
			(a, b) = (i, j)
print(a, b)
zv = a * b - n
answer = []
while sum(answer) != zv:
	answer.append(1)
i = 0
answer += [0] * a
symb = 0
for i in range(a):
	print(s[symb:symb + b - answer[i]] + '*' * answer[i])
	symb += b - answer[i]


s = input()
ls = len(s)
co = 0
st = 0
c = 0
for i in range(1, 6):
	for j in range(1, 21):
		if i * j >= ls:
			st = i
			co = j
			c = 1
			break
	if c:
		break
print(st, co)
num = co * st - ls
kek = 0
if num == 0:
	for i in range(st):
		for j in range(co):
			print(s[kek], end='')
			kek += 1
		print()
	exit()
arr = []
for i in range(st):
	arr.append(num // st)
for i in range(num % st):
	arr[i] += 1
ai = 0
kek = 0
for i in range(st):
	print(arr[ai] * '*', end='')
	for j in range(co - arr[ai]):
		print(s[kek], end='')
		kek += 1
	print()
	ai += 1


def main():
	s = input()
	n = len(s)
	a = 5
	b = (n + a - 1) // a
	for an in range(5, 0, -1):
		bn = (n + an - 1) // an
		if bn <= 20:
			a = an
			b = bn
	print(a, b)
	l = (n + a - 1) // a
	l1 = n // a
	l2 = l1 + 1
	for x in range(n % l1):
		sub = s[:l2]
		sub += '*' * (b - len(sub))
		print(sub)
		s = s[l2:]
	for x in range(a - n % l1):
		sub = s[:l1]
		sub += '*' * (b - len(sub))
		print(sub)
		s = s[l1:]
main()


import math
string = input()
lines = 0
for i in range(1, 6):
	if math.ceil(len(string) / i) <= 20:
		lines = i
		break
print(lines, math.ceil(len(string) / lines))

def stars(lines):
	if lines == 1:
		print(string)
	elif len(string) / lines == 20:
		i = 0
		while i < len(string):
			print(string[i:i + 20])
			i += 20
	else:
		in_line = math.ceil(len(string) / lines)
		short_lines = -(len(string) - math.ceil(len(string) / lines) * lines)
		i = 0
		j = 0
		while i < len(string):
			if j < lines - short_lines:
				print(string[i:i + in_line])
				i += in_line
				j += 1
			else:
				answer = list(string[i:i + in_line - 1])
				answer.insert(-2, '*')
				answer = ''.join(answer)
				print(answer)
				i += in_line - 1
stars(lines)


s = input()
a = len(s)
count = 0
k = 0
minn = 0
if a % 20 == 0:
	minstr = a // 20
	minn = 20
else:
	minstr = a // 20 + 1
	while minn * minstr < a:
		minn += 1
if a % minn == 0:
	print(a // minn, end=' ')
	print(minn)
	for i in range(a // minn):
		print(s[i * minn:i * minn + minn])
else:
	print(a // minn + 1, end=' ')
	print(minn)
	for i in range(a // 20 + 1):
		if count < minn * (a // minn + 1) - a - (minn * (a // minn + 1) - a) // (a // minn + 1) * (a // minn + 1):
			j = 1
			count += 1
		else:
			j = 0
		x = (minn * (a // minn + 1) - a) // (a // minn + 1) + j
		for i in range(x):
			print('*', end='')
		print(s[k:k + minn - x])
		k += minn - x


n = input()
k = len(n)
if k > 20:
	for i in range(2, 6):
		if k / i <= 20:
			if k / i == int(k / i):
				t = k // i
				p = i
				o = 0
				break
			if (k + 1) / i == int((k + 1) / i):
				t = (k + 1) // i
				p = i
				o = 1
				break
			if i > 2:
				if (k + 2) / i == int((k + 2) / i):
					t = (k + 2) // i
					p = i
					o = 2
					break
				if i > 3:
					if (k + 3) / i == int((k + 3) / i):
						t = (k + 3) // i
						p = i
						o = 3
						break
					if i == 5:
						if (k + 4) / i == int((k + 4) / i):
							t = (k + 4) // i
							p = i
							o = 4
							break
	print(p, t)
	l = 0
	for i in range(p):
		if i < p - o:
			print(n[l:t])
			n = n[t:]
		else:
			t -= 1
			print(n[l:t] + '*')
			n = n[t:]
			t += 1
else:
	print(1, k)
	print(n)


from math import ceil
s = input()
l = len(s)
row = ceil(l / 20)
col = ceil(l / row)
count = row * col - l
stars = [0] * row
for i in range(row):
	stars[i] = count // (row - i)
	count -= count // (row - i)
print(row, col)
gap = 0
for i in range(row):
	print(s[col * i - gap:col * (i + 1) - stars[i] - gap], '*' * stars[i], sep='')
	gap += stars[i]


import math
max_rows = 5
max_cols = 20
name = input()
rows = math.ceil(len(name) / max_cols)
cols = math.ceil(len(name) / rows)
num_asterisks = rows * cols - len(name)
num_asterisks_per_col = num_asterisks // cols
print(rows, cols)
pos = 0
for row in range(rows):
	num_astks = num_asterisks_per_col + (num_asterisks % cols > row)
	end_pos = pos + cols - num_astks
	print('*' * num_astks + name[pos:end_pos])
	pos = end_pos


s = input()
amm_of_s = len(s)
for m in range(1, min(amm_of_s, 5) + 1):
	if (amm_of_s + m - 1) // m <= 20:
		break
a = m
b = amm_of_s // a + (amm_of_s % a != 0)
stars = a * b - amm_of_s
full = stars // m
partly = stars % m
out = ['*' * full] * m
b -= full + 1
for i in range(partly):
	out[i] += '*'
for i in range(partly):
	out[i] += s[:b]
	s = s[b:]
for i in range(partly, m):
	out[i] += s[:b + 1]
	s = s[b + 1:]
print(m, b + full + 1)
print('\n'.join(out))


s = str(input())
ymax = 5
xmax = 20
check = False
stars = 0
xmin = 0
ymin = 0
for ycur in range(1, ymax + 1):
	if not check:
		for xcur in range(1, xmax + 1):
			sq = ycur * xcur
			starcnt = sq - len(s)
			if starcnt >= 0 and sq - len(s) >= 0 and (ycur >= starcnt) and ((len(s) + starcnt) / ycur == xcur):
				xmin = xcur
				ymin = ycur
				stars = starcnt
				check = True
				break
	else:
		break
y = 0
print(ymin, xmin)
while y < ymin * xmin:
	if stars > 0:
		print(s[:xmin - 1] + '*')
		s = s[xmin - 1:]
		stars -= 1
	else:
		print(s[:xmin])
		s = s[xmin:]
	y += xmin
s


s = input()
n = len(s)
t = 1
while t < 6:
	if t * 20 >= n:
		break
	t += 1
if t == 1:
	print(1, n)
	print(s)
else:
	for i in range(t + 1):
		if (n + i) % t == 0:
			x = i
			break
	print(t, (n + i) // t)
	l = [['', 0] for i in range(t)]
	for i in range(x):
		l[i][0] += '*'
	for i in range(t):
		v = 0
		if l[i][0] == '*':
			v = 1
		l[i][1] = (n + x) // t - v
	k = 0
	i = 0
	while k < len(s):
		for b in range(l[i][1]):
			l[i][0] += s[k]
			k += 1
		i += 1
	for i in range(len(l)):
		print(l[i][0])


s = input()
for i in range(1, 6):
	if len(s) // i <= 20:
		value = len(s) // i + min(len(s) % i, 1)
		if value > 20:
			continue
		print(i, value)
		if value - len(s) // i == 0:
			l = 0
			r = value
			for j in range(i):
				print(s[l:r])
				(l, r) = (r, r + value)
		else:
			l = 0
			r = len(s) // i
			for j in range(value * i - len(s)):
				print(s[l:r] + '*')
				(l, r) = (r, r + len(s) // i)
			r += 1
			for j in range(i - value * i + len(s)):
				print(s[l:r])
				(l, r) = (r, r + value)
		break


s = input()
lenS = len(s)
nR = (lenS + 19) // 20
nC = (lenS + nR - 1) // nR
appd = lenS % nR
common = lenS // nR
shift = 0
print(nR, nC)
for i in range(nR):
	right = shift + common + int(i < appd)
	print(s[shift:right] + '*' * (nC - (right - shift)))
	shift = right


import math

def check(k, s):
	kol = len(s) / k
	if math.ceil(kol) <= 20:
		return True
	return False

def checkst(t, k, s):
	kol = len(s) / k
	if math.ceil(kol) <= t:
		return True
	return False

def check1(kk, k, s):
	kol = len(s) // k
	if kol * k + kk == len(s):
		return True
	return False
s = input()
row = 1
for i in range(1, 6):
	if check(i, s):
		row = i
		break
for col in range(1, 21):
	if checkst(col, row, s):
		print(row, col)
		kol = 0
		for j in range(1, row + 1):
			if check1(j, row, s):
				kol = j
				break
		x = 0
		if len(s) % row == 0:
			for i in range(row):
				for j in range(col):
					print(s[x], end='')
					x += 1
				print()
			exit(0)
		for i in range(kol):
			for j in range(col):
				print(s[x], end='')
				x += 1
			print()
		for i in range(row - kol):
			for j in range(col):
				if j == col - 1:
					print('*', end='')
				else:
					print(s[x], end='')
					x += 1
			print()
		exit(0)


import math
s = input()
m = math.ceil(len(s) / 20)
n = 20 - (20 - len(s) % 20) % 20 // m
k = n * m - len(s)
answ = ['' for i in range(m)]
for h in range(m):
	if k == 0:
		break
	for i in range(min(m - h, k)):
		answ[i] += '*'
	k -= min(m - h, k)
z = 0
for i in range(m):
	l = n - len(answ[i])
	answ[i] += s[z:z + l]
	z += l
print(m, n)
for e in answ:
	print(e)


st = input()
a = (len(st) - 1) // 20 + 1
aster = (a - len(st)) % a
b = (len(st) + aster) // a
print(a, b)
for i in range(aster):
	st = st[:i * b] + '*' + st[i * b:]
for i in range(a):
	print(st[i * b:(i + 1) * b])


s = input()
a = 1
name_plate = []
while len(s) / a > 20:
	a += 1
if len(s) % a == 0:
	for i in range(a):
		name_plate.append(s[i * len(s) // a:(i + 1) * len(s) // a])
	print(a, len(s) // a)
	for i in name_plate:
		print(i)
else:
	l = ''
	asterisk = (len(s) // a + 1) * a - len(s)
	j = 0
	while j < asterisk:
		l += s[j * (len(s) - asterisk) // a:(j + 1) * (len(s) - asterisk) // a] + '*'
		j += 1
	l += s[j * (len(s) - asterisk) // a:]
	for i in range(a):
		name_plate.append(l[i * len(l) // a:(i + 1) * len(l) // a])
	print(a, len(l) // a)
	for i in name_plate:
		print(i)


from sys import stdin, stdout, setrecursionlimit
from gc import disable
from math import ceil
disable()
gets = input
puts = print
input = stdin.readline
print = stdout.write

def main() -> int:
	s = gets()
	n = len(s)
	if n <= 20:
		puts(1, n)
		puts(s)
		return 0
	stolb = 20
	while True:
		cstr = ceil(n / stolb)
		if cstr * ceil(n / cstr) - n <= cstr and stolb < 21 and (cstr < 6):
			count = cstr * ceil(n / cstr) - n
			sdvig = 0
			puts(cstr, ceil(n / cstr))
			while count:
				puts(s[-sdvig + sdvig * ceil(n / cstr):sdvig * ceil(n / cstr) + ceil(n / cstr) - 1 - sdvig] + '*')
				count -= 1
				sdvig += 1
			for i in range(sdvig, cstr):
				puts(s[-sdvig + i * ceil(n / cstr):i * ceil(n / cstr) + ceil(n / cstr) - sdvig])
			break
		else:
			stolb -= 1
	return 0
main()


from math import gcd, ceil
a = input()
l = len(a)
for r in range(1, 6):
	c = min(20, ceil(l / r))
	if r * c >= l:
		z = r * c - l
		z_in_row = ceil(z / r)
		strt = 0
		print(r, c)
		for i in range(r):
			cnt = z_in_row if z >= z_in_row else z
			print(a[strt:strt + c - cnt] + '*' * cnt)
			strt = strt - cnt + c
			z = max(0, z - z_in_row)
		break


s = input()
s = list(s)
l = len(s)
r = l // 20
if r * 20 != l:
	r = r + 1
c = l // r
if c * r != l:
	c = c + 1
q = r * c - l
t = 0
print('%i %i' % (r, c))
i = 0
a = 0
while i < r:
	j = 0
	m = 0
	while j < c:
		if t < q and m == 0:
			print('*', end='')
			t = t + 1
			m = 1
		else:
			print(s[a], end='')
			a = a + 1
		j = j + 1
	i = i + 1
	print()


from math import ceil, floor
s = input()
l = len(s)
d = int(ceil(l / 20))
res = 20
t_res = res
while t_res != 0 and int(ceil(l / t_res)) == d:
	res = t_res
	t_res -= 1
rem = (res - l % res) % res
stars_d = rem % d
stars = rem / d
stars_f = int(floor(stars))
print(d, res)
pos = 0
for i in range(d):
	stars1 = stars_f
	if stars_d != 0:
		stars1 += 1
		stars_d -= 1
	ts = s[pos:pos + res - stars1] + '*' * stars1
	pos += res - stars1
	print(ts)


h = input()
g = len(h)
import math
a = math.ceil(g / 20)
(q, l) = divmod(g, a)
print(a, math.ceil(g / a))
c = 0
z = 0
if not l:
	l = a
	q -= 1
for i in range(a - l):
	z += q
	print(h[c:z] + '*')
	c += q
q += 1
for i in range(l):
	z += q
	print(h[c:z])
	c += q


s = input()
l = len(s)
if l <= 20:
	print(1, l)
	print(s)
elif l <= 40:
	l1 = l // 2
	z = l % 2
	if z == 0:
		print(2, l1)
		print(s[0:l1])
		print(s[l1:l])
	else:
		print(2, l1 + 1)
		print(s[0:l1] + '*')
		print(s[l1:l])
elif l <= 60:
	l1 = l // 3
	z = l % 3
	if z == 0:
		print(3, l1)
		print(s[0:l1])
		print(s[l1:2 * l1])
		print(s[2 * l1:l])
	elif z == 1:
		print(3, l1 + 1)
		print(s[0:l1] + '*')
		print(s[l1:2 * l1] + '*')
		print(s[2 * l1:l])
	elif z == 2:
		print(3, l1 + 1)
		print(s[0:l1] + '*')
		print(s[l1:2 * l1 + 1])
		print(s[2 * l1 + 1:l])
elif l <= 80:
	l1 = l // 4
	z = l % 4
	if z == 0:
		print(4, l1)
		print(s[0:l1])
		print(s[l1:2 * l1])
		print(s[2 * l1:3 * l1])
		print(s[3 * l1:l])
	elif z == 1:
		print(4, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 1] + '*')
		print(s[2 * l1 + 1:3 * l1 + 1] + '*')
		print(s[3 * l1 + 1:l] + '*')
	elif z == 2:
		print(4, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 2])
		print(s[2 * l1 + 2:3 * l1 + 2] + '*')
		print(s[3 * l1 + 2:l] + '*')
	elif z == 3:
		print(4, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 2])
		print(s[2 * l1 + 2:3 * l1 + 3])
		print(s[3 * l1 + 3:l] + '*')
elif l <= 100:
	l1 = l // 5
	z = l % 5
	if z == 0:
		print(5, l1)
		print(s[0:l1])
		print(s[l1:2 * l1])
		print(s[2 * l1:3 * l1])
		print(s[3 * l1:4 * l1])
		print(s[4 * l1:l])
	elif z == 1:
		print(5, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 1] + '*')
		print(s[2 * l1 + 1:3 * l1 + 1] + '*')
		print(s[3 * l1 + 1:4 * l1 + 1] + '*')
		print(s[4 * l1 + 1:l] + '*')
	elif z == 2:
		print(5, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 2])
		print(s[2 * l1 + 2:3 * l1 + 2] + '*')
		print(s[3 * l1 + 2:4 * l1 + 2] + '*')
		print(s[4 * l1 + 2:l] + '*')
	elif z == 3:
		print(5, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 2])
		print(s[2 * l1 + 2:3 * l1 + 3])
		print(s[3 * l1 + 3:4 * l1 + 3] + '*')
		print(s[4 * l1 + 3:l] + '*')
	elif z == 4:
		print(5, l1 + 1)
		print(s[0:l1 + 1])
		print(s[l1 + 1:2 * l1 + 2])
		print(s[2 * l1 + 2:3 * l1 + 3])
		print(s[3 * l1 + 3:4 * l1 + 4])
		print(s[4 * l1 + 4:l] + '*')


import math
line = input()
rows = math.ceil(len(line) / 20)
cols = math.ceil(len(line) / rows)
stars = rows * cols - len(line)
print(rows, cols)
c = 0
for i in range(rows):
	r = 1 if stars > 0 else 0
	used = cols - r
	print('*' * r + line[c:c + used])
	stars -= r
	c += used


(b, h) = (20, 5)
s = input()
r = (len(s) + b - 1) // b
c = (len(s) + r - 1) // r
short = c - 1
full_rows = len(s) % r if len(s) % r else r
print(r, c)
print(*[s[0 + i * c:c + i * c] for i in range(full_rows)] + [s[full_rows * c + i * short:full_rows * c + short + i * short] + '*' for i in range(r - full_rows)], sep='\n')


from math import ceil
s = input()
a = ceil(len(s) / 20)
b = ceil(len(s) / a)
c = a * b - len(s)
print(a, b)
for i in range(c):
	print('*' + s[0:b - 1])
	s = s[b - 1:]
for i in range(a - c):
	print(s[0:b])
	s = s[b:]


import math
s = input()
le = len(s)
strr = math.ceil(le / 20)
lish = strr * 20 - le
zv = []
if lish % strr == 0:
	zv = [lish // strr] * strr
elif lish % strr == 1:
	zv = [lish // strr] * strr
	zv[0] += 1
elif lish % strr == 2:
	zv = [lish // strr] * strr
	zv[0] += 1
	zv[1] += 1
elif lish % strr == 3:
	zv = [lish // strr] * strr
	zv[0] += 1
	zv[1] += 1
	zv[2] += 1
elif lish % strr == 4:
	zv = [lish // strr] * strr
	zv[0] += 1
	zv[1] += 1
	zv[2] += 1
	zv[3] += 1
mas = []
x = min(zv)
for i in range(strr):
	zv[i] -= x
sumzv = sum(zv)
print(strr, (le + sumzv) // strr)
masss = [0]
for i in range(strr):
	masss.append((le + sumzv) // strr - zv[i] + masss[-1])
for i in range(1, strr + 1):
	print(s[masss[i - 1]:masss[i]] + '*' * zv[i - 1])


strr = list(input())
s = len(strr)
linescount = s // 20 + (s % 20 != 0)
zvezd = 20 - s % 20
if zvezd == 20:
	zvezd = 0
zvezd_per_line = zvezd // linescount
ostt_zvzd = zvezd % linescount
if linescount == 1:
	ggcount = len(strr)
else:
	ggcount = 20 - zvezd_per_line
print(linescount, ggcount)
for i in range(linescount):
	curzvzd = ostt_zvzd > 0
	ostt_zvzd -= 1
	cursmvls = ggcount - curzvzd
	if linescount == 1:
		cursmvls = ggcount
		curzvzd = 0
	for s in range(cursmvls):
		print(strr.pop(0), end='')
	print('*' * curzvzd)


import math, sys
a = input()
n = len(a)
for i in range(1, 6):
	x1 = math.ceil(n / i) * i
	j = x1 // i
	if j > 20:
		continue
	stars = x1 - n
	l = 0
	print(i, j)
	for k in range(i):
		if k < stars % i:
			print('*' * (stars // i + 1), end='')
			need = j - (stars // i + 1)
			while l < n and need != 0:
				print(a[l], end='')
				l += 1
				need -= 1
			print()
		else:
			print('*' * (stars // i), end='')
			need = j - stars // i
			while l < n and need != 0:
				print(a[l], end='')
				l += 1
				need -= 1
			print()
	break


from math import ceil
from sys import exit
s = input()
l = len(s)
if l <= 20:
	print(1, l)
	print(s)
	exit(0)
r = ceil(l / 2)
if r <= 20:
	x = l % 2
	print(2, r)
	print(s[:r], end='')
	print()
	print(s[r:], end='')
	if x == 1:
		print('*')
	exit(0)
r = ceil(l / 3)
if r <= 20:
	x = l % 3
	print(3, r)
	if x == 0:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:])
	elif x == 2:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:] + '*')
	elif x == 1:
		print(s[:r])
		print(s[r:r * 2 - 1] + '*')
		print(s[2 * r - 1:] + '*')
	exit(0)
r = ceil(l / 4)
if r <= 20:
	x = l % 4
	print(4, r)
	if x == 0:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r])
		print(s[3 * r:])
	elif x == 1:
		print(s[:r])
		print(s[r:r * 2 - 1] + '*')
		print(s[2 * r - 1:3 * r - 2] + '*')
		print(s[3 * r - 2:] + '*')
	elif x == 2:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r - 1] + '*')
		print(s[3 * r - 1:] + '*')
	elif x == 3:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r])
		print(s[3 * r:] + '*')
	exit(0)
r = ceil(l / 5)
if r <= 20:
	x = l % 5
	print(5, r)
	if x == 0:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r])
		print(s[3 * r:4 * r])
		print(s[4 * r:])
	elif x == 1:
		print(s[:r])
		print(s[r:r * 2 - 1] + '*')
		print(s[2 * r - 1:3 * r - 2] + '*')
		print(s[3 * r - 2:4 * r - 3] + '*')
		print(s[4 * r - 3:] + '*')
	elif x == 2:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r - 1] + '*')
		print(s[3 * r - 1:4 * r - 2] + '*')
		print(s[4 * r - 2:] + '*')
	elif x == 3:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r])
		print(s[3 * r:4 * r - 1] + '*')
		print(s[4 * r - 1:] + '*')
	elif x == 4:
		print(s[:r])
		print(s[r:r * 2])
		print(s[2 * r:3 * r])
		print(s[3 * r:4 * r])
		print(s[4 * r:] + '*')
	exit(0)


S = input()
c = len(S)
a = 1
b = 1
while b <= 20:
	if b == c:
		print(a, b)
		print(S)
		break
	b = b + 1
a = 2
if 20 < c <= 40:
	if c % 2 == 1:
		b = c // 2 + 1
		x = S[:len(S) // 2]
		y = S[len(S) // 2:]
		print(a, b)
		print(x + '*')
		print(y)
	else:
		b = c // 2
		x = S[:len(S) // 2]
		y = S[len(S) // 2:]
		print(a, b)
		print(x)
		print(y)
a = 3
if 40 < c <= 60:
	if c % 3 == 2:
		b = c // 3 + 1
		x = S[:len(S) // 3]
		y = S[len(S) // 3:len(S) // 3 * 2 + 1]
		z = S[len(S) // 3 * 2 + 1:]
		print(a, b)
		print(x + '*')
		print(y)
		print(z)
	elif c % 3 == 1:
		b = c // 3 + 1
		x = S[:len(S) // 3]
		y = S[len(S) // 3:len(S) // 3 * 2]
		z = S[len(S) // 3 * 2:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z)
	else:
		b = c // 3
		x = S[:len(S) // 3]
		y = S[len(S) // 3:len(S) // 3 * 2]
		z = S[len(S) // 3 * 2:]
		print(a, b)
		print(x)
		print(y)
		print(z)
a = 4
if 60 < c <= 80:
	if c % 4 == 3:
		b = c // 4 + 1
		x = S[:len(S) // 4]
		y = S[len(S) // 4:len(S) // 4 * 2 + 1]
		z = S[len(S) // 4 * 2 + 1:len(S) // 4 * 3 + 2]
		v = S[len(S) // 4 * 3 + 2:]
		print(a, b)
		print(x + '*')
		print(y)
		print(z)
		print(v)
	elif c % 4 == 2:
		b = c // 4 + 1
		x = S[:len(S) // 4]
		y = S[len(S) // 4:len(S) // 4 * 2]
		z = S[len(S) // 4 * 2:len(S) // 4 * 3 + 1]
		v = S[len(S) // 4 * 3 + 1:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z)
		print(v)
	elif c % 4 == 1:
		b = c // 4 + 1
		x = S[:len(S) // 4]
		y = S[len(S) // 4:len(S) // 4 * 2]
		z = S[len(S) // 4 * 2:len(S) // 4 * 3]
		v = S[len(S) // 4 * 3:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z + '*')
		print(v)
	else:
		b = c // 4
		x = S[:len(S) // 4]
		y = S[len(S) // 4:len(S) // 4 * 2]
		z = S[len(S) // 4 * 2:len(S) // 4 * 3]
		v = S[len(S) // 4 * 3:]
		print(a, b)
		print(x)
		print(y)
		print(z)
		print(v)
a = 5
if 80 < c <= 100:
	if c % 5 == 4:
		b = c // 5 + 1
		x = S[:len(S) // 5]
		y = S[len(S) // 5:len(S) // 5 * 2 + 1]
		z = S[len(S) // 5 * 2 + 1:len(S) // 5 * 3 + 2]
		v = S[len(S) // 5 * 3 + 2:len(S) // 5 * 4 + 3]
		q = S[len(S) // 5 * 4 + 3:]
		print(a, b)
		print(x + '*')
		print(y)
		print(z)
		print(v)
		print(q)
	elif c % 5 == 3:
		b = c // 5 + 1
		x = S[:len(S) // 5]
		y = S[len(S) // 5:len(S) // 5 * 2]
		z = S[len(S) // 5 * 2:len(S) // 5 * 3 + 1]
		v = S[len(S) // 5 * 3 + 1:len(S) // 5 * 4 + 2]
		q = S[len(S) // 5 * 4 + 2:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z)
		print(v)
		print(q)
	elif c % 5 == 2:
		b = c // 5 + 1
		x = S[:len(S) // 5]
		y = S[len(S) // 5:len(S) // 5 * 2]
		z = S[len(S) // 5 * 2:len(S) // 5 * 3]
		v = S[len(S) // 5 * 3:len(S) // 5 * 4 + 1]
		q = S[len(S) // 5 * 4 + 1:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z + '*')
		print(v)
		print(q)
	elif c % 5 == 1:
		b = c // 5 + 1
		x = S[:len(S) // 5]
		y = S[len(S) // 5:len(S) // 5 * 2]
		z = S[len(S) // 5 * 2:len(S) // 5 * 3]
		v = S[len(S) // 5 * 3:len(S) // 5 * 4]
		q = S[len(S) // 5 * 4:]
		print(a, b)
		print(x + '*')
		print(y + '*')
		print(z + '*')
		print(v + '*')
		print(q)
	else:
		b = c // 5
		x = S[:len(S) // 5]
		y = S[len(S) // 5:len(S) // 5 * 2]
		z = S[len(S) // 5 * 2:len(S) // 5 * 3]
		v = S[len(S) // 5 * 3:len(S) // 5 * 4]
		q = S[len(S) // 5 * 4:]
		print(a, b)
		print(x)
		print(y)
		print(z)
		print(v)
		print(q)


import math
name = input()
stroki = math.ceil(len(name) / 20)
stolb = 20 - math.floor((stroki * 20 - len(name)) / stroki)
stars = stroki * stolb - len(name)
howmuch = math.ceil(stars / stroki)
print(stroki, stolb)
breaki = 0
for i in range(stroki - 1):
	if stars == 0:
		print(name[breaki:breaki + stolb])
		breaki += stolb
	else:
		print(name[breaki:breaki + stolb - howmuch] + '*' * howmuch)
		breaki += stolb - howmuch
		stars -= howmuch
print(name[breaki:breaki + stolb - stars] + '*' * stars)


s = input()
l = len(s)
if len(s) % 20 == 0:
	print(len(s) // 20, 20)
	g = 0
	for i in range(len(s) // 20):
		d = 0
		while d != 20:
			print(s[g], end='')
			g += 1
			d += 1
		print()
else:
	k = len(s) // 20
	z = 0
	while (l + z) % (k + 1) != 0:
		z += 1
	print(k + 1, (l + z) // (k + 1))
	h = z // (k + 1)
	f = z - z // (k + 1)
	g = 0
	for i in range(k + 1):
		d = 0
		if f != 0:
			print('*', end='')
			d += 1
			f -= 1
		print('*' * h, end='')
		d += h
		while d != (l + z) // (k + 1):
			print(s[g], end='')
			g += 1
			d += 1
		print()


from math import ceil
s = input()
n = len(s)
stro = ceil(n / 20)
stolM = ceil(n / stro)
print(stro, stolM)
pos = stro - (stolM * stro - n)
k = 0
f = stolM
sh = stolM
fl = False
for i in range(stro):
	if i == pos and pos != 0:
		sh -= 1
		f -= 1
		fl = True
	print(s[k:f], end='')
	if fl:
		print('*', end='')
	print()
	k = f
	f = k + sh


import math
a = input()
b = len(a)
x = math.ceil(b / 20)
c = math.ceil(b / x)
y = []
z = c * x - b
cnt = 0
for k in range(x):
	y.append(a[:c])
	a = a[c:]
	if z != 0:
		d = y[k][-1]
		y[k] = y[k][:-1]
		a = d + a
		z -= 1
		y[k] += '*'
		cnt += 1
print(x, c)
print('\n'.join(map(str, y)))


from math import *
name = input()
n = len(name)
if n <= 20:
	print(1, n)
	print(name)
	exit(0)
rows = []
rows_amount = 2
while n / rows_amount > 20:
	rows_amount += 1
cutted = ceil(n / rows_amount)
print(rows_amount, cutted)
i = 0
start = 0
ostatok = n % rows_amount if n % rows_amount != 0 else rows_amount
while i < rows_amount - (rows_amount - ostatok):
	rows.append(name[start:start + cutted])
	i += 1
	start += cutted
cutted -= 1
while i < rows_amount:
	rows.append(name[start:start + cutted])
	rows[-1] += '*'
	i += 1
	start += cutted
for j in rows:
	print(j)


s = input()
for i in range(1, 6):
	d = len(s) / i
	d1 = len(s) // i + 1
	o = i - len(s) % i
	if o == i:
		d1 = len(s) // i
		o = 0
	if d <= 20:
		i1 = 0
		c = 0
		print(i, int(d1))
		while i1 < len(s):
			print(s[i1], end='')
			c += 1
			i1 += 1
			if c == d1 - 1 and o > 0:
				print('*', end='')
				o -= 1
				c += 1
			if c == d1:
				c = 0
				print()
		break


import math

def ed(result, stroki, stolb):
	print(stroki, stolb)
	for i in result:
		print(i)

def endd(stolb, stroki):
	k = 0
	b = []
	result = []
	for i in word:
		b.append(i)
		k += 1
		if k == stolb:
			result.append(''.join(b))
			b = []
			k = 0
	ed(result, stroki, stolb)

def th(stars, stolb, stroki):
	b = []
	k = 0
	list_res = []
	for i in word:
		if k == stolb - 1:
			if stars != 0:
				b.append('*')
				list_res.append(''.join(b))
				b = [i]
				k = 1
				stars -= 1
				continue
		b.append(i)
		k += 1
		if k == stolb:
			list_res.append(''.join(b))
			b = []
			k = 0
	ed(list_res, stroki, stolb)

def start():
	dlina = len(word)
	stroki = math.ceil(dlina / 20)
	stolb = math.ceil(dlina / stroki)
	all = stroki * stolb
	if all == dlina:
		endd(stolb, stroki)
	else:
		stars = all - dlina
		th(stars, stolb, stroki)
word = list(input())
if len(word) < 21:
	print(1, len(word))
	print(''.join(word))
	exit()
else:
	start()


from math import ceil

def solve():
	s = input()
	for a in range(1, 6):
		for b in range(1, 21):
			k = a * b - len(s)
			if k == 0:
				print(a, b)
				b2 = b
				for j in range(0, len(s), b):
					print(s[j:b2])
					b2 += b
				quit()
			elif k > 0:
				c = k // a
				dop = k % a
				print(a, b)
				b2 = b
				j = 0
				while j < len(s):
					l = ceil(c + dop / a)
					print('*' * l + s[j:b2 - l])
					if dop > 0:
						dop -= 1
					j += b - l
					b2 += b - l
				quit()
solve()


import math
hand = input()
l = len(hand)
s = int(math.ceil(l / 20))
stars1 = s * 20 - l
max_stars = stars1 // s
if stars1 % s != 0:
	min_stars = max_stars
	max_stars += 1
else:
	min_stars = max_stars
st_in_s = []
for i in range(stars1 % s):
	st_in_s.append(max_stars)
for f in range(s - stars1 % s):
	st_in_s.append(min_stars)
for i in range(len(st_in_s)):
	st_in_s[i] -= min_stars
all_stars = sum(st_in_s)
res_s = s
res_b = (l + all_stars) // s
table = []
j = 0
for i in range(s):
	if all_stars != 0:
		table.append(hand[j:j + res_b - 1] + '*')
		j += res_b - 1
		all_stars -= 1
	else:
		table.append(hand[j:j + res_b])
		j += res_b
print(res_s, res_b)
for i in range(s):
	print(table[i])


s = input()
l = len(s)
c = 1
i = -1
an = (l - 1) // 20 + 1
bn = l // an
while c != 0:
	a = (l - 1) // 20 + 1
	b = l // a
	c = l % a
	l += 1
	i += 1
print(a, b + c)
for j in range(a):
	if i > 0:
		print(s[:bn] + '*')
		s = s[bn:]
		i -= 1
	else:
		print(s[:b])
		s = s[b:]


s = input()
a = (len(s) + 19) // 20
b = (len(s) + a - 1) // a
print(a, b)
stars = a * b - len(s)
stline = stars // a
ostst = stars % a
uk = 0
for i in range(a):
	ln = 0
	print('*' * stline, end='')
	ln = stline
	if ostst != 0:
		ln += 1
		print('*', end='')
		ostst -= 1
	while ln < b:
		print(s[uk], end='')
		ln += 1
		uk += 1
	print()


st = input().strip()
l = len(st)
now = -(-l // 20)
if l == 1:
	print(1, 1)
	print(st)
	exit()
for i in range(20, 0, -1):
	if -(-l // (i - 1)) > now:
		now1 = i
		break
now2 = -l % now1
count = 0
print(-(-l // now1), now1)
for i in range(-(-l // i)):
	for j in range(now1):
		if now2 != 0 and i == j:
			print('*', end='')
			now2 -= 1
		else:
			print(st[count], end='')
			count += 1
	print()


s = input()
zvezd = 0
if len(s) % 20 != 0:
	st = len(s) // 20 + 1
	if len(s) % st != 0:
		simb = len(s) // st + 1
	else:
		simb = len(s) // st
	zvezd = st * simb - len(s)
else:
	simb = 20
	st = len(s) // 20
i = 0
k = 0
print(st, simb)
while i != st:
	for j in range(simb):
		if j == simb - 1 and zvezd != 0:
			print('*')
			zvezd -= 1
		else:
			if j != simb - 1:
				print(s[k], end='')
			else:
				print(s[k])
			k += 1
	i += 1


s = input()
t = len(s)
a = t // 20 + 1 - int(t % 20 == 0)
b = t // a + 1 - int(t % a == 0)
print(a, b)
k = a * b - t
k = a - k
p = 0
for x in range(a):
	if k > 0:
		for i in range(p, p + b):
			print(s[i], end='')
		print()
		k -= 1
		p = p + b
	else:
		for i in range(p, p + b - 1):
			print(s[i], end='')
		print('*', end=' ')
		print()
		p = p + b - 1


def ceil(a, b):
	return (a + b - 1) // b
s = input()
n = len(s)
if n <= 20:
	print(1, n)
	print(s)
else:
	rows = ceil(n, 20)
	cols = ceil(n, rows)
	stars = rows * cols - n
	(eachRowStar, remStars) = divmod(stars, rows)
	print(rows, cols)
	i = 0
	while i < n:
		if remStars > 0:
			print(s[i:i + cols - 1] + '*' * eachRowStar + '*')
			remStars -= 1
			i += cols - 1
		else:
			print(s[i:i + cols] + '*' * eachRowStar)
			i += cols


from math import ceil
s = input()
a = ceil(len(s) / 20)
b = ceil(len(s) / a)
z = a * b - len(s)
e = z // b
l = z % b
print(a, b)
for i in range(a):
	g = e + (l > 0)
	l -= 1
	print('*' * g + s[:b - g])
	s = s[b - g:]


def gen_table(a, b, name):
	stars = a * b - len(name)
	if stars < 0:
		return []
	table = []
	n = stars // a
	printed = 0
	for _ in range(stars % a):
		table.append(''.join(('*' * (n + 1), name[printed:printed + b - (n + 1)])))
		printed += b - (n + 1)
	for _ in range(a if n == 0 else (stars - (n + 1) * (stars % a)) // n):
		table.append(''.join(('*' * n, name[printed:printed + b - n])))
		printed += b - n
	return table

def main():
	name = input()
	for a in range(1, 6):
		for b in range(1, 21):
			table = gen_table(a, b, name)
			if table:
				print(a, b)
				print('\n'.join(table))
				return
main()


import math
rows = 5
columns = 20
str1 = input()
handle_count = len(str1)
real_rows = 0
for i in range(rows):
	if handle_count / (i + 1) <= columns:
		real_rows = i + 1
		break
max_columns = math.ceil(handle_count / real_rows)
print(real_rows, max_columns)
for i in range(real_rows):
	column = math.ceil(len(str1) / (real_rows - i))
	real_str = str1[:column]
	str1 = str1[column:]
	if len(real_str) < max_columns:
		real_str += '*'
	print(real_str)


from math import *
s = input()
length = len(s)
if length <= 20:
	print(1, length)
	print(s)
	exit(0)
else:
	row = ceil(len(s) / 20)
	for column in range(0, 21):
		if row * column == length:
			print(row, column)
			prev = 0
			for i in range(column, length + 1, column):
				print(s[prev:i])
				prev = i
			exit(0)
		elif row * column > length and row * column <= length + row:
			need_starts = abs(length - row * column)
			prev = 0
			for i in range(column - 2, length + 1, column):
				if need_starts == 0:
					break
				s = s[:i] + '*' + s[i:]
				need_starts -= 1
			print(row, column)
			for i in range(column, len(s) + 1, column):
				print(s[prev:i])
				prev = i
			exit(0)


a = input()
l = len(a)
str = l // 20 + 1
if l % 20 == 0:
	str -= 1
stl = l // str
if l % str != 0:
	stl += 1
zapas = stl * str - l
naz = 0
print(str, stl)
for i in range(str):
	if str - i < zapas:
		naz += 1
	for u in range(stl):
		if u < stl - 1:
			print(a[i * stl + u - naz], end='')
		elif str - i <= zapas:
			print('*')
		else:
			print(a[i * stl + u - naz])


from math import ceil
s = input()
ls = len(s)
mstr = ceil(ls / 20)
if ls < 20:
	print(1, ls)
	print(s)
else:
	k = ceil(ls / mstr)
	x = 0
	z = k * mstr - ls
	if z != 0:
		f = True
	else:
		f = False
	y = 0
	print(mstr, k)
	for i in range(mstr):
		for j in range(y, y + k):
			if f:
				print('*', end='')
				f = False
				z -= 1
			else:
				print(s[y], end='')
				y += 1
		if z != 0:
			f = True
		print()


from sys import stdout
a = [str(s) for s in input()]
b = len(a)
k = b // 20 + int(b % 20 > 0)
st = 20 - (k * 20 - b) // k
zv = (k * 20 - b) % k
j = 0
print(k, st)
for i in range(k):
	if zv:
		zv -= 1
		stdout.write(''.join(a[j:j + st - 1]) + '*' + '\n')
		j += st - 1
	else:
		stdout.write(''.join(a[j:j + st]) + '\n')
		j += st


readints = lambda : map(int, input().strip('\n').split())
s = input()
n = len(s)

def solve(s, n):
	for r in range(1, 6):
		for c in range(1, 21):
			if r * c < n:
				continue
			rowLen = [c] * r
			cur = r * c
			ptr = r - 1
			while cur > n:
				rowLen[ptr] -= 1
				ptr = ptr - 1 if ptr - 1 >= 0 else r - 1
				cur -= 1
			rowLenMax = max(rowLen)
			i = 0
			rows = []
			for j in range(r):
				buf = s[i:i + rowLen[j]]
				if len(buf) < rowLenMax:
					buf += '*'
				rows.append(buf)
				i += rowLen[j]
			print(r, c)
			for row in rows:
				print(row)
			return
solve(s, n)


a = str(input())
x = len(a)
n = x // 20
n1 = int()
if x % 20 > 0:
	n = n + 1
k = x // n
if x % n > 0:
	k = k + 1
print(n, '', k)
if k * n == x:
	for i in range(1, n + 1):
		print(a[k * (i - 1):k * i])
else:
	n1 = n * k - x
	for i in range(n1):
		a = a[0:(k + 3) * i] + '*' + a[(k + 3) * i:len(a)]
	for i in range(1, n + 1):
		print(a[k * (i - 1):k * i])


s = input()
l = len(s)
k = 0
str = 0
st = 0
if l // 20 * 20 != l:
	str = l // 20 + 1
else:
	str = l // 20
ost = 20 * str - l
if ost // str >= 1:
	st = 20 - ost // str
else:
	st = 20
ost -= str * (ost // str)
print(str, st)
for i in range(str):
	if ost != 0:
		st -= 1
		print('*', end='')
	for j in range(st):
		print(s[k], end='')
		k += 1
	if ost != 0:
		st += 1
		ost -= 1
	print()


a = str(input())
s = len(a)
m = s // 20 + int(s % 20 != 0)
n = s // m + int(s % m != 0)
free = -s + n * m
prev = 0
print(m, n)
for i in range(m):
	print(a[i * n - prev:(i + 1) * n - int(free % m - i > 0) - prev] + '*' * int(free % m - i > 0))
	prev += int(free % m - i > 0)


import math
handle = input()
len_h = len(handle)
a = math.ceil(len_h / 20)
b = math.ceil(len_h / a)
amount = a * b - len_h
print(a, b)
while handle:
	if amount > 0:
		print(f'{handle[:b - 1]}*')
		handle = handle[b - 1:]
		amount -= 1
	else:
		print(f'{handle[:b]}')
		handle = handle[b:]


handle = input()
lg = len(list(handle))
st = 0
tb = 0
lol = 0
lol2 = 1
lol3 = True
stars = 0
for i in range(1, 6):
	if lg <= 20 * i:
		st = i
		break
if lg / i % 1 != 0:
	tb = lg / i // 1 + 1
else:
	tb = lg // i
stars = int(st * tb - lg)
tb = int(tb)
handle = list(handle)
print(st, tb)
for i in range(st):
	if stars == 0:
		lol2 = 0
	elif stars >= lol2:
		lol2 = 1
	print(''.join(handle[:tb - lol2]) + '*' * lol2)
	stars -= lol2
	del handle[:tb - lol2]


from math import *
xxl = input()
xl = len(xxl)
answer = []
x = ceil(xl / 20)
if xl % x == 0:
	print(x, xl // x)
	for i in range(x):
		xi = xxl[:xl // x]
		xxl = xxl[xl // x:]
		answer.append(xi)
	for i in range(len(answer)):
		print(answer[i])
else:
	xl = xl // x + 1
	xm = xl * x - len(xxl)
	for i in range(x):
		if xm != 0:
			xi = '*' + xxl[:xl - 1]
			xxl = xxl[xl - 1:]
			xm = xm - 1
		else:
			xi = xxl[:xl]
			xxl = xxl[xl:]
		answer.append(xi)
	print(x, xl)
	for i in range(len(answer)):
		print(answer[i])


def main():
	s = input()
	n = len(s)
	k = (n - 1) // 20 + 1
	c = 0
	res = []
	for i in range(k):
		res.append(s[c:c + n // k] + ('' if n % k == 0 else '*' if i >= n % k else s[c + n // k]))
		c += n // k if i >= n % k or n % k == 0 else n // k + 1
	print(len(res), len(res[0]))
	print('\n'.join(res))
main()


a = input()
l = len(a)
b = 5
c = 20
while b * c - c >= l:
	b -= 1
while b * c - b >= l:
	c -= 1
g = (c * b - l) // b
f = (c * b - l) % b
k = 0
for i in range(b):
	a = a[:c * i + k] + '*' * (g + (f != 0)) + a[c * i + k + g:]
	k += g + (f != 0)
	if f != 0:
		f -= 1
print(b, c)
for i in range(b):
	print(a[i * c:(i + 1) * c])


s = input()
l = len(s)
strings = l // 20
pas = True
for i in range(6):
	if pas:
		for j in range(2 * i):
			if (l + j) % i == 0 and (l + j) // i <= 20:
				a = i
				z = j
				b = (l + j) // i
				print(a, b)
				pas = False
				break
arr = [[0 for i in range(b)] for i in range(a)]
i = 0
while z != 0:
	arr[i][0] = '*'
	i += 1
	z -= 1
k = 0
for i in range(a):
	for j in range(b):
		if arr[i][j] != '*':
			arr[i][j] = s[k]
			k += 1
for i in range(a):
	for j in range(b):
		print(arr[i][j], end='')
	print()


w = list(input())
v = len(w)
m = (v + 19) // 20
n = (v + m - 1) // m
zw = m * n - v
print(m, n)
y = zw // m
for i in range(m):
	q = 0
	for k in range(y):
		print('*', end='')
	for j in range(n):
		if zw > 0 and q == 0:
			print('*', end='')
			q = 1
			zw -= 1
		elif j != n - 1:
			x = len(w) - v
			print(w[x], end='')
			v -= 1
		else:
			x = len(w) - v
			print(w[x])
			v -= 1


s = input()
n = len(s)
a = (n + 19) // 20
imb = (n + a - 1) // a
left = imb * a - n
index = 0
print(a, imb)
for i in range(a):
	print('*' * ((left + a - 1) // a) + s[index:index + imb - (left + a - 1) // a])
	index += imb - (left + a - 1) // a
	left -= (left + a - 1) // a


s = input()
dlina = len(s)
a = dlina // 20
if dlina % 20 != 0:
	a += 1
zvezdi = 0
if dlina <= 20:
	zvezdi = 0
elif dlina % a != 0:
	zvezdi = a - dlina % a
b = (dlina + zvezdi) // a
print(a, b)
le = 0
r = b
bal = 0
for i in range(a):
	if zvezdi > 0:
		z = 1
		zvezdi -= 1
	else:
		z = 0
	print(s[le:r - z] + '*' * z)
	le += b
	r += b
	if z == 1:
		le -= 1
		r -= 1


s = input()
a = (len(s) + 19) // 20
b = (len(s) + a - 1) // a
n = a * b - len(s)
k = 0
print(a, b)
while n > 0:
	print(s[k:k + b - 1] + '*')
	k = k + b - 1
	n -= 1
while k < len(s):
	print(s[k:k + b])
	k = k + b


in_str = input()
rows = len(in_str)
if 20 * (rows // 20) == rows:
	rows = rows // 20
else:
	rows = rows // 20 + 1
count_zn = len(in_str) // rows
st = len(in_str) % rows
last = 0
if st == 0:
	print(rows, count_zn)
	st = -1
else:
	print(rows, count_zn + 1)
for i in range(rows):
	if st > 0:
		print(in_str[:count_zn + 1])
		st -= 1
		last = count_zn + 1
		in_str = in_str[last:]
	elif st == 0:
		print(in_str[:count_zn] + '*')
		last = count_zn
		in_str = in_str[last:]
	elif st == -1:
		print(in_str[:count_zn])
		last = count_zn
		in_str = in_str[last:]


from math import ceil
s = input()
ln = ceil(len(s) / 20)
in_one = len(s) // ln
ceil_in_one = ceil(len(s) / ln)
k = len(s) % ln
line = ''
i = 0
j = 0
print(ln, ceil_in_one)
if k == 0:
	for i in range(ln):
		print(s[i * ceil_in_one:(i + 1) * ceil_in_one])
else:
	j = 0
	start = 0
	end = ceil_in_one
	for i in range(ln):
		if k > 0:
			k -= 1
			j += ceil_in_one
			print(s[start:end])
			start += ceil_in_one
			end += ceil_in_one
			if k == 0:
				end -= 1
		else:
			j += ceil_in_one - 1
			print(s[start:end] + '*')
			start += ceil_in_one - 1
			end += ceil_in_one - 1


def ceil(a):
	if a - int(a) == 0:
		return int(a)
	return int(a + 1)
s = input()
a = 0
b = 0
n = len(s)
for i in range(1, 6):
	b = ceil(n / i)
	if b <= 20:
		a = i
		break
stars = [0] * a
stars_count = b * a - n
i = 0
while stars_count > 0:
	stars[i] += 1
	stars_count -= 1
	i += 1
	if i >= a:
		i = 0
print(a, b)
k = 0
for i in range(a):
	print(s[k:k + b - stars[i]], end='')
	for i in range(stars[i]):
		print('*', end='')
	print()
	k += b - stars[i]


s = input()
if len(s) <= 20:
	print('1' + ' ' + str(len(s)))
	print(s)
else:
	l = len(s)
	a = l // 20
	if l % 20 > 0:
		a += 1
	b = l // a
	if l % a > 0:
		b += 1
	k = l % a
	if k != 0:
		j = 0
		print(str(a) + ' ' + str(b))
		for i in range(k):
			print(s[j:j + b])
			j += b
		for i in range(a - k):
			print(s[j:j + b - 1] + '*')
			j += b - 1
	else:
		j = 0
		print(str(a) + ' ' + str(b))
		for i in range(a):
			print(s[j:j + b])
			j += b


s = input()
l = len(s)
x = l // 20 + (l % 20 > 0)
y = l // x + (l % x > 0)
zv = y * x - l
zv_min = zv // x
zv_dop = zv % x
s_ans = ''
prev = 0
for i in range(zv_dop):
	s_ans += '*' * (zv_min + 1) + s[prev:prev - zv_min + y - 1] + '\n'
	prev = prev - zv_min + y - 1
for i in range(x - zv_dop):
	s_ans += '*' * zv_min + s[prev:prev - zv_min + y] + '\n'
	prev = prev - zv_min + y
print(x, y)
print(s_ans)


q = input()
qq = len(q)
if qq % 20 == 0:
	print(qq // 20, 20)
	for i in range(qq // 20):
		print(q[:20])
		q = q[20:]
else:
	s = qq // 20 + 1
	if qq % s != 0:
		st = qq // s + 1
		z = s * st - qq
	else:
		st = qq // s
		z = 0
	zns = ['', '', '', '', '']
	for i in range(z):
		zns[i % s] += '*'
	print(s, st)
	for i in range(s):
		print(q[:st - len(zns[i])], zns[i], sep='')
		q = q[st - len(zns[i]):]


s = input()
lenn = len(s)
if lenn <= 20:
	print(1, lenn)
	print(s)
elif lenn <= 40:
	print(2, (lenn + 1) // 2)
	print(s[:(lenn + 1) // 2])
	print(s[(lenn + 1) // 2:] + '*' * (lenn % 2))
elif lenn <= 60:
	print(3, (lenn + 2) // 3)
	print(s[:(lenn + 2) // 3])
	print(s[(lenn + 2) // 3:2 * (lenn + 1) // 3] + '*' * (lenn % 3 % 2))
	print(s[2 * (lenn + 1) // 3:] + '*' * min(1, lenn % 3))
elif lenn <= 80:
	print(4, (lenn + 3) // 4)
	print(s[:(lenn + 3) // 4])
	print(s[(lenn + 3) // 4:2 * ((lenn + 3) // 4) - lenn % 4 % 3 % 2] + '*' * (lenn % 4 % 3 % 2))
	print(s[2 * ((lenn + 3) // 4) - lenn % 4 % 3 % 2:3 * ((lenn + 3) // 4) - (lenn % 4 % 3 + 1) // 2 - lenn % 4 % 3 % 2] + '*' * ((lenn % 4 % 3 + 1) // 2))
	print(s[3 * ((lenn + 3) // 4) - (lenn % 4 % 3 + 1) // 2 - lenn % 4 % 3 % 2:] + '*' * min((1, lenn % 4)))
else:
	print(5, (lenn + 4) // 5)
	print(s[:(lenn + 4) // 5])
	print(s[(lenn + 4) // 5:2 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2] + '*' * (lenn % 5 % 4 % 3 % 2))
	print(s[2 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2:3 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2 - min(1, lenn % 5 % 4 % 3)] + '*' * min(1, lenn % 5 % 4 % 3))
	print(s[3 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2 - min(1, lenn % 5 % 4 % 3):4 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2 - min(1, lenn % 5 % 4 % 3) - min(1, (lenn % 5 % 4 + 1) // 2)] + '*' * min(1, (lenn % 5 % 4 + 1) // 2))
	print(s[4 * ((lenn + 4) // 5) - lenn % 5 % 4 % 3 % 2 - min(1, lenn % 5 % 4 % 3) - min(1, (lenn % 5 % 4 + 1) // 2):] + '*' * min(1, lenn % 5))


a = input()
if len(a) % 20 == 0:
	k = len(a) // 20
else:
	k = len(a) // 20 + 1
f = len(a) % 20
s = [0] * k
for i in range(k - 1):
	s[i] = a[:20]
	a = a[20:]
s[-1] = a
if k == 1:
	print(1, len(s[0]))
	for i in s[0]:
		print(i, end='')
	exit()
u = -1
v = 0
while True:
	if len(s[-1]) >= len(s[-2]) - 1:
		break
	for i in range(v, k - 1):
		s[i + 1] = s[i][-1:] + s[i + 1]
		s[i] = s[i][:-1]
	v += 1
	v = v % (k - 1)
	if len(s[-1]) >= len(s[-2]) - 1:
		break
for i in s:
	u = max(u, len(i))
print(k, u)
cc = 0
for i in s:
	cc += 1
	for j in i:
		print(j, end='')
	print('*' * (u - len(i)), end='')
	if not cc == k:
		print()


s = input()
n = len(s)
mini = (n + 19) // 20
l = (n + mini - 1) // mini
k = l * mini - n
k = mini - k
print(mini, l)
i = 0
for x in range(mini):
	if k > 0:
		for y in range(i, i + l):
			print(s[y], end='')
		print()
		k -= 1
		i = i + l
	else:
		for y in range(i, i + l - 1):
			print(s[y], end='')
		print('*', end=' ')
		print()
		i = i + l - 1


import math
h = input()
mem = [101, 21, 6]
for w in range(20, 0, -1):
	if int(math.modf(len(h) / (w + 1))[1] + 1) <= 5:
		if int(math.modf(len(h) / (w + 1))[1] + 1) <= mem[2] and len(h) - w * int(math.modf(len(h) / (w + 1))[1] + 1) <= mem[0] and (w * int(math.modf(len(h) / (w + 1))[1] + 1) - len(h) >= 0):
			mem = [w * int(math.modf(len(h) / (w + 1))[1] + 1) - len(h), w, int(math.modf(len(h) / (w + 1))[1] + 1)]
print(mem[2], mem[1])
st = ['' for w in range(mem[2])]
k = 0
for w in range(mem[0]):
	st[k] += '*'
	k += 1
	if k == 5:
		k = 0
for w in range(len(st)):
	k = mem[1] - len(st[w])
	st[w] = h[:k] + st[w]
	h = h[k:]
for w in st:
	print(w)


huy = input()
l = len(huy)
st = (l + 19) // 20
kek = (l + st - 1) // st
stars = st * kek - l
print(st, kek)
for i in range(kek):
	if stars:
		print(huy[:kek - 1] + '*')
		huy = huy[kek - 1:]
		stars -= 1
	else:
		print(huy[:kek])
		huy = huy[kek:]


def naz(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1
nick = input()
n_str = naz(len(nick), 20)
n_col = naz(len(nick), n_str)
if n_col * n_str == len(nick):
	n_col_tr = n_col
else:
	n_col_tr = n_col - 1
print(n_str, n_col)
if n_col != n_col_tr:
	for i in range(1, 6):
		if (len(nick) - n_col * i) % (n_str - i) == 0:
			n1 = i
			break
	for i in range(n1):
		print(nick[:n_col])
		nick = nick[n_col:]
	for i in range(n_str - n1):
		print(nick[:n_col_tr] + '*')
		nick = nick[n_col_tr:]
else:
	for i in range(n_str):
		print(nick[:n_col])
		nick = nick[n_col:]


a = input()
b = []
l = len(a)
r = (len(a) + 19) // 20
print(r, (l + r - 1) // r)
for i in range(r):
	if i < l % r:
		b += [a[:l // r + 1]]
	elif l % r == 0:
		b += [a[:l // r]]
	else:
		b += [a[:l // r] + '*']
	a = a[l // r:]
	if i < l % r:
		a = a[1:]
for i in b:
	print(i)


s = input()
l = len(s)
if l // 20 == 0:
	print(1, l)
	print(s)
else:
	cols = 20
	raws = l // 20 + bool(l % 20)
	while True:
		ncols = cols - 1
		nraws = l // ncols + bool(l % ncols)
		if nraws > raws:
			break
		else:
			cols = ncols
			raws = nraws
	stars = cols * raws - l
	ier = stars // raws
	isr = stars % raws
	p = 0
	print(raws, cols)
	for i in range(isr):
		np = p + cols - ier - 1
		print(s[p:np] + '*' * (ier + 1))
		p = np
	for i in range(raws - isr):
		np = p + cols - ier
		print(s[p:np] + '*' * ier)
		p = np


import math
mb = True
l = list(input())
u = []
n = len(l)
string = 0
stolb = 0
uk = 0
for i in range(1, 6):
	if mb:
		for k in range(1, 21):
			if i * k >= n:
				string = i
				stolb = k
				mb = False
				break
stars = string * stolb - n
amount = stars
for i in range(1, stars):
	l.insert(i * stolb, '*')
	amount -= 1
if amount == 1:
	l.append('*')
	amount -= 1
print(string, stolb)
for i in range(1, string + 1):
	for k in range(stolb):
		if k == stolb - 1:
			print(l[(i - 1) * stolb + k])
			continue
		print(l[(i - 1) * stolb + k], end='')


handle = input()
for a in range(1, 6):
	for b in range(1, 21):
		stars = a * b - len(handle)
		huh = stars % a
		if stars >= 0:
			print(a, b)
			for i in range(a):
				s = '*' * (stars // a) + ('*' if huh > 0 else '')
				huh -= 1
				print(s + handle[:b - len(s)])
				handle = handle[b - len(s):]
			exit(0)


MAX_COLS = 20
s = input()
length = len(s)
separator = 0
if length <= MAX_COLS:
	print(1, length)
	print(s)
else:
	rows = (length + MAX_COLS - 1) // MAX_COLS
	cols = (length + rows - 1) // rows
	print(rows, cols)
	diff = rows * cols - length
	flag = False
	for i in range(rows):
		if i < rows - diff:
			print(s[cols * i:cols * (i + 1)])
		elif flag == False:
			print(s[cols * i:cols * i + cols - 1], '*', sep='')
			separator = cols * i + cols - 1
			flag = True
		else:
			print(s[separator:separator + cols - 1], '*', sep='')
			separator = separator + cols - 1


s = input()
if len(s) <= 20:
	print(1, len(s))
	print(s)
else:
	ok = 0
	n = len(s)
	for st in range(1, 6):
		for add in range(0, 5):
			if ok == 1:
				continue
			if (n + add) % st == 0 and (n + add) // st <= 20:
				was = 0
				if add != 0:
					was = 1
				p = (n + add) // st
				if add == 0 and was == 0:
					print(st, p)
					for i in range(st):
						print(s[i * p:(i + 1) * p])
					ok = 1
					continue
				if add > 0:
					p -= 1
					print(st, p + 1)
				else:
					print(st, p)
				c = 0
				for i in range(st - add):
					print(s[i * (p + 1):(i + 1) * (p + 1)])
					c = (i + 1) * (p + 1)
				for i in range(add):
					print(s[c + i * p:c + (i + 1) * p] + '*')
				ok = 1


import math
(n, x) = (input(), -1)
for i in range(1, 6):
	x = math.ceil(len(n) / i)
	if x <= 20:
		break
need = x * i - len(n)
if need == 0:
	print(i, x)
	for g in range(1, len(n) + 1):
		print(n[g - 1], end='')
		if g % x == 0:
			print()
else:
	mass = [0] * i
	for g in range(need):
		mass[g] += 1
	last = 0
	print(i, x)
	for g in range(i):
		print('*' * mass[g], n[last:last + (x - mass[g])], sep='')
		last = last + (x - mass[g])


s = input()
k = len(s)
rows = (k - 1) // 20 + 1
trash = (20 - k % 20) % 20
col = 20 - trash // rows
trash = trash % rows
pointer = 0
print(rows, col)
for i in range(rows - 1):
	now = col
	if trash > 0:
		now -= 1
		print('*', end='')
		trash -= 1
	print(s[pointer:pointer + now])
	pointer += now
print(s[pointer:])


def pr(l, n):
	for i in range(1, 6):
		md = l % i
		dv = l // i + 1 if md > 0 else l // i
		if md <= i and dv <= w:
			md = dv * i - l
			n = list(n)
			for j in range(md):
				n.insert(j * dv, '*')
			print(i, dv)
			for j in range(i):
				print(''.join(n[j * dv:j * dv + dv]))
			break
n = input()
h = 5
w = 20
pr(len(n), n)


def round_fract(number1, number2):
	return number1 // number2 + int(bool(number1 % number2))
string = input()
length = len(string)
counter = 1
columns = round_fract(length, counter)
while columns > 20:
	counter += 1
	columns = round_fract(length, counter)
print(counter, columns)
stars = counter - length % counter
counter2 = columns - 1
if counter > 1 and length != counter * columns:
	for star in range(stars):
		string = string[:counter2] + '*' + string[counter2:]
		counter2 += columns
for number in range(counter):
	print(string[number * columns:(number + 1) * columns])


import math
handle = input()
handle_length = len(handle)
rows = math.ceil(handle_length / 20)
columns = math.ceil(handle_length / rows)
no_of_asterisks = rows * columns - handle_length
asterisks_per_row = no_of_asterisks // rows
print(rows, columns)
char_counter = 0
i = 0
while i < handle_length:
	if char_counter < handle_length // rows:
		print(handle[i], end='')
		char_counter += 1
		i += 1
	elif char_counter < columns:
		if no_of_asterisks > 0:
			print('*', end='')
			char_counter += 1
			no_of_asterisks -= 1
		else:
			print(handle[i], end='')
			char_counter += 1
			i += 1
	else:
		char_counter = 0
		print()


s = input()
line = 5
col = 20
mark = len(s)
q_l = (mark + (col - 1)) // col
q_c = (mark + (q_l - 1)) // q_l
print(q_l, q_c)
q_star = q_l * q_c - mark
for i in range(q_star):
	print(s[(q_c - 1) * i:(q_c - 1) * (i + 1)] + '*')
m = (q_c - 1) * q_star
for i in range(q_l - q_star):
	print(s[q_c * i + m:q_c * (i + 1) + m])


def table(hendle):
	l = len(hendle)
	an = 0
	while 1:
		if l <= 20 * an:
			break
		else:
			an += 1
	zvc = (an - l % an) % an
	while l % an != 0:
		l += 1
	st = l // an
	print(an, st)
	a = 1
	for i in range(an):
		if zvc != 0:
			print(hendle[st * i - a + 1:st * (i + 1) - a] + '*')
			zvc -= 1
			a += 1
		else:
			print(hendle[st * i - a + 1:st * (i + 1) - a + 1])
hendle = input()
table(hendle)


s = input()
n = len(s)
k = (n + 19) // 20
l = n // k - (n % k == 0)
t = n - l * k
print(k, l + 1)
for i in range(t):
	print(s[i * (l + 1):i * (l + 1) + l + 1])
for j in range(k - t):
	print(s[t * (l + 1) + j * l:t * (l + 1) + j * l + l] + '*')


s = input()
L = len(s)
if L <= 20:
	a = 1
	b = L
	print(a, b)
	print(s)
elif L == 100:
	a = 5
	b = 20
	print(a, b)
	for i in range(a):
		print(s[i * b:(i + 1) * b])
else:
	alfa = [0] * 20
	for i in range(1, 6):
		if (L + i - 1) // i <= 20:
			a = i
			b = (L + i - 1) // i
			break
	zvezd = a * b - L
	while zvezd > 0:
		for i in range(5):
			zvezd -= 1
			alfa[i] += 1
			if zvezd == 0:
				a -= 1
				break
	if a * b != L:
		a += 1
	else:
		alfa = [0] * 20
	ans = ''
	last = -1
	minus = 0
	minus2 = 0
	cc = 0
	print(a, b)
	for i in range(a):
		ans = s[:b - alfa[i]] + alfa[i] * '*'
		print(ans)
		s = s[b - alfa[i]:]


import math, time
handle = input()
length = len(handle)
lines = 1
while lines <= 5:
	if length / lines > 20:
		lines += 1
	else:
		break
table = ''
n = 0
i = 0
columns = math.ceil(length / lines)
astsks = columns * lines - length
while True:
	if n == columns:
		table += '\n'
		n = 0
	if n == columns - 1 and astsks != 0:
		table += '*'
		n += 1
		astsks -= 1
	else:
		table += handle[i]
		i += 1
		n += 1
	if i >= length:
		break
table_list = table.split('\n')
table = '\n'.join(table_list)
print(lines, columns)
print(table)


import math
s = input()
l = len(s)
q = 0
r = math.ceil(l / 20)
qw = math.ceil(l / r)
k = r * qw - l
zv = 0
print(r, qw)
b = [0] * r
for i in range(r):
	b[i] = k // (r - i)
	k -= k // (r - i)
for i in range(r):
	print(s[qw * i - zv:qw * (i + 1) - b[i] - zv], '*' * b[i], sep='')
	zv += b[i]


s = input()
l = len(s)
a = (l + 19) // 20
star = a * 20 - l
b = 20 - star // a
star = star % a
print(a, b)
for i in range(a):
	if star != 0:
		star -= 1
		print('*' + s[:b - 1])
		s = s[b - 1:]
	else:
		print(s[:b])
		s = s[b:]


s = input()
n = len(s)
rows = (n + 19) // 20
cols = (n + rows - 1) // rows
stars = rows * cols - n
print(rows, cols)
for i in range(stars):
	print(s[:cols - 1] + '*')
	s = s[cols - 1:]
for i in range(stars, rows):
	print(s[:cols])
	s = s[cols:]


(w, h) = (20, 5)
s = input()
len_s = len(s)
strok = (len_s + w - 1) // w
cnt_all = (w - len_s % w) % w
count_cnt2 = cnt_all % strok
count_cnt1 = strok - count_cnt2
cnt1 = cnt_all // strok
cnt2 = (cnt_all + strok - 1) // strok
ans = list()
it = 0
it1 = 0
it2 = w - cnt1
new_len = w - cnt1
zv = '*' * 20
print(strok, w - cnt1)
for i in range(count_cnt1):
	print(s[it1:it1 + w - cnt1])
	it1 = it1 + w - cnt1
for i in range(count_cnt2):
	print(s[it1:it1 + w - cnt2] + '*')
	it1 = it1 + w - cnt2


s = input().strip()
n = len(s)
fl = False
for a in range(1, 6):
	for b in range(1, 21):
		if fl:
			break
		k = a * b - n
		if k < 0:
			continue
		x = (k + a - 1) // a
		y = x * a - k
		i = 0
		ans = [['*'] * b for j in range(a)]
		for i_ in range(a):
			for j_ in range(b - x):
				if i == n:
					break
				ans[i_][j_] = s[i]
				i += 1
				if i < n and i_ < y and (j_ == b - x - 1):
					ans[i_][j_ + 1] = s[i]
					i += 1
		print(a, b)
		for i in range(a):
			print(*ans[i], sep='')
		fl = True


s = input()
n = len(s)
nn = n
x = 1
while n // x + (n % x > 0) > 20:
	x += 1
y = n // x + (n % x > 0)
prev = 0
print(x, y)
for j in range(x):
	pos = prev + nn // x
	if nn % x > 0:
		pos += 1
		nn -= 1
	t = s[prev:pos]
	if len(t) < y:
		t += '*'
	print(t)
	prev = pos


from math import ceil
a = str(input())
strlen = len(a)
nrow = ceil(strlen / 20)
ncol = ceil(strlen / nrow)
nstars = nrow * ncol - strlen
print(str(nrow) + ' ' + str(ncol))
for i in range(nrow):
	if i < nstars:
		print(a[0:ncol - 1] + '*')
		a = a[ncol - 1:]
	else:
		print(a[0:ncol])
		a = a[ncol:]


s = input()
lenn = len(s)
for a in range(1, 6):
	if a * 20 < lenn:
		continue
	if a % 2 == 0:
		minn = lenn // a * (a // 2) + (lenn // a - 1) * (a // 2)
		maxx = (lenn + a - 1) // a * a
		if minn <= lenn and lenn <= maxx:
			break
	else:
		minn = lenn // a * (a // 2) + (lenn // a - 1) * (a // 2 + 1)
		maxx = (lenn + a - 1) // a * a
		if minn <= lenn and lenn <= maxx:
			break
b = maxx // a
kolz = maxx - lenn
print(a, b)
c = 0
for i in s:
	print(i, end='')
	c += 1
	if c + 1 == b and kolz > 0:
		print('*')
		kolz -= 1
		c = 0
	if c == b and kolz == 0:
		print()
		c = 0


def roundup(a, d):
	if a % d == 0:
		return a // d
	else:
		return a // d + 1
s = input()
st = roundup(len(s), 20)
cl = roundup(len(s), st)
print(st, cl)
stars = st * cl - len(s)
t = [''] * st
row = 0
for i in s:
	t[row] += i
	if stars <= 0:
		var = 0
	else:
		var = 1
	if len(t[row]) + var == cl:
		t[row] += '*' * var
		stars -= 1
		row += 1
print('\n'.join(t))


import math
c = input()
o = 0
s = ''
a = math.ceil(len(c) / 20)
b = math.ceil(len(c) / a)
b1 = math.floor(len(c) / a)
print(a, b)
col = a * b - len(c)
for i in range(a):
	for j in range(b1):
		s = s + c[o + j]
	if (col < a - i) & (len(c) % a != 0):
		j += 1
		s = s + c[o + j]
	else:
		while len(s) < b:
			s = s + '*'
	print(s)
	s = ''
	o = o + j + 1


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from itertools import accumulate

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Lcm(x, y):
	return x * y // gcd(x, y)

def dtob(n):
	return bin(n).replace('0b', '')

def btod(n):
	return int(n, 2)

def common(l1, l2):
	return set(l1).intersection(l2)

def solution():
	n = Lstr()
	l = len(n)
	m = ceil(l / 20)
	for i in range(19, 0, -1):
		if ceil(l / i) != m:
			ans = i + 1
			break
	else:
		ans = l
	for i in range(m * ans - l):
		n.insert(ans * (i + 1) - 1, '*')
	print(m, ans)
	prev = 0
	for i in range(m):
		print(''.join(n[prev:ans * (i + 1)]))
		prev = ans * (i + 1)
solution()


w = input()
l = len(w)
a = (l - 1) // 20 + 1
b = (l - 1) // a + 1
print(a, b)
d = a * b - l
if d == 0:
	for i in range(a):
		c = w[0:b:1]
		w = w[b:l]
		print(c)
if d == 1:
	for i in range(a - 1):
		c = w[0:b:1]
		w = w[b:l]
		print(c)
	print(w + '*')
if d == 2:
	for i in range(a - 2):
		c = w[0:b:1]
		w = w[b:l]
		print(c)
	c = w[0:b - 1:1]
	w = w[b - 1:l]
	print(c + '*')
	print(w + '*')
if d == 3:
	for i in range(a - 3):
		c = w[0:b:1]
		w = w[b:l]
		print(c)
	for i in range(2):
		c = w[0:b - 1:1]
		w = w[b - 1:l]
		print(c + '*')
	print(w + '*')
if d == 4:
	for i in range(a - 4):
		c = w[0:b:1]
		w = w[b:l]
		print(c)
	for i in range(3):
		c = w[0:b - 1:1]
		w = w[b - 1:l]
		print(c + '*')
	print(w + '*')