After playing Neo in the legendary "Matrix" trilogy, Keanu Reeves started doubting himself: maybe we really live in virtual reality? To find if this is true, he needs to solve the following problem.

Let's call a string consisting of only zeroes and ones good if it contains different numbers of zeroes and ones. For example, 1, 101, 0000 are good, while 01, 1001, and 111000 are not good.

We are given a string $s$ of length $n$ consisting of only zeroes and ones. We need to cut $s$ into minimal possible number of substrings $s_1, s_2, \ldots, s_k$ such that all of them are good. More formally, we have to find minimal by number of strings sequence of good strings $s_1, s_2, \ldots, s_k$ such that their concatenation (joining) equals $s$, i.e. $s_1 + s_2 + \dots + s_k = s$.

For example, cuttings 110010 into 110 and 010 or into 11 and 0010 are valid, as 110, 010, 11, 0010 are all good, and we can't cut 110010 to the smaller number of substrings as 110010 isn't good itself. At the same time, cutting of 110010 into 1100 and 10 isn't valid as both strings aren't good. Also, cutting of 110010 into 1, 1, 0010 isn't valid, as it isn't minimal, even though all $3$ strings are good.

Can you help Keanu? We can show that the solution always exists. If there are multiple optimal answers, print any.


-----Input-----

The first line of the input contains a single integer $n$ ($1\le n \le 100$) — the length of the string $s$.

The second line contains the string $s$ of length $n$ consisting only from zeros and ones.


-----Output-----

In the first line, output a single integer $k$ ($1\le k$) — a minimal number of strings you have cut $s$ into.

In the second line, output $k$ strings $s_1, s_2, \ldots, s_k$ separated with spaces. The length of each string has to be positive. Their concatenation has to be equal to $s$ and all of them have to be good.

If there are multiple answers, print any.


-----Examples-----
Input
1
1

Output
1
1
Input
2
10

Output
2
1 0
Input
6
100011

Output
2
100 011



-----Note-----

In the first example, the string 1 wasn't cut at all. As it is good, the condition is satisfied.

In the second example, 1 and 0 both are good. As 10 isn't good, the answer is indeed minimal.

In the third example, 100 and 011 both are good. As 100011 isn't good, the answer is indeed minimal.

Difficulty: EASY
Tags: String algorithms

Starter code:

Solutions:
n = int(input())
s = str(input())
count1 = s.count('0')
count2 = s.count('1')
if count1 == count2:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
l = input()
if l.count('0') == l.count('1'):
	print(2)
	print(l[:-1], l[-1])
else:
	print(1)
	print(l)


n = int(input())
arr = input()
if arr.count('1') == arr.count('0'):
	print(2)
	print(arr[:-1], arr[-1])
else:
	print(1)
	print(arr)


n = int(input())
s = input()
t1 = s.count('1')
t2 = s.count('0')
if t1 == t2:
	print(2)
	print(s[0], end=' ')
	print(s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
if len(s) > 1 and s.count('0') == s.count('1'):
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


from math import ceil
n = int(input())
s = input()
if s.count('0') == s.count('1'):
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
for _ in range(1):
	n = int(input())
	a = [x for x in input()]
	c = b = 0
	for x in a:
		if x == '1':
			c += 1
		else:
			b += 1
	if c != b:
		print('1\n' + ''.join(a))
	else:
		d = e = 0
		for x in range(n):
			d += int(a[x] == '1')
			e += int(a[x] == '0')
			if d != e and b - d != c - e:
				print('2\n' + ''.join(a[:x + 1]) + ' ' + ''.join(a[x + 1:n]))
				break


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd

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

def si():
	return str(input())

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

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

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

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

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

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)
	print(l)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans
n = ii()
s = si()
c1 = 0
c0 = 0
for i in range(n):
	if s[i] == '1':
		c1 += 1
	else:
		c0 += 1
if c1 != c0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


def isGood(m):
	return m.count('1') != m.count('0')

def check(string, n):
	if isGood(string):
		print('1')
		print(string)
		return
	for i in range(n - 1):
		a = string[:i + 1]
		b = string[i + 1:]
		if isGood(a) and isGood(b):
			print('2')
			print(a, end=' ')
			print(b)
			return
n = int(input())
string = input()
check(string, n)


def solve():
	n = int(input())
	s = input()
	count0 = 0
	for i in s:
		if i == '0':
			count0 += 1
	count1 = n - count0
	if count1 != count0:
		print('1\n' + s)
		return
	print('2\n' + s[0] + ' ' + s[1:])
solve()


n = int(input())
s = list(input())
zero = len(list(filter(lambda x: x == '0', s)))
one = len(list(filter(lambda x: x == '1', s)))
if zero != one:
	print(1)
	print(''.join(s))
else:
	a = s.pop(0)
	print(2)
	print(a, ''.join(s))


from sys import stdin
n = int(stdin.readline().strip())
s = stdin.readline().strip()
z = s.count('0')
o = s.count('1')
if z != o:
	print(1)
	print(s)
	exit(0)
for i in range(1, n + 1):
	z1 = s[0:i].count('1')
	o1 = s[0:i].count('0')
	z2 = s[i:].count('1')
	o2 = s[i:].count('0')
	if z1 != o1 and z2 != o2:
		print(2)
		print(s[0:i], s[i:])
		break


n = int(input())
s = input()
zero = s.count('0')
if n == 1 or zero != n / 2:
	print(1)
	print(s)
	exit()
print(2)
print(s[0] + ' ' + s[1:])


while True:
	try:
		(n, s) = (input(), input())
		cunt = s.count('1')
		leng = len(s)
		if cunt == 0 or leng == 1:
			print('1', '\n' + s)
		elif leng - cunt == cunt:
			print('2', '\n' + s[0], s[1:])
		else:
			print('1', '\n' + s)
	except EOFError:
		break


n = int(input())
s = input()
if n % 2 == 1:
	print(1)
	print(s)
else:
	c0 = s.count('0')
	c1 = s.count('1')
	if c0 == c1:
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)


n = int(input())
a = [i for i in input()]
z = o = 0
for i in range(n):
	if a[i] == '0':
		z += 1
	else:
		o += 1
if z != o:
	print('{}\n{}'.format(1, ''.join(a)))
	exit()
z_l = o_l = 0
for i in range(n):
	if a[i] == '0':
		z_l += 1
		z -= 1
	else:
		o_l += 1
		o -= 1
	if z_l != o_l and z != o:
		print('2\n{} {}'.format(''.join(a[:i + 1]), ''.join(a[i + 1:])))
		exit()


n = int(input())
l = input()
if n == 1:
	print(1)
	print(l)
elif l.count('1') == 0 or l.count('0') == 0:
	print(1)
	print(l)
elif l.count('1') != l.count('0'):
	print(1)
	print(l)
else:
	print(2)
	for i in range(len(l) - 1, -1, -1):
		if l[i:].count('0') != l[i:].count('1') and l[:i].count('1') != l[:i].count('0'):
			print(l[:i], l[i:])
			break


n = int(input())
s = input()
k_1 = 0
for i in s:
	if i == '1':
		k_1 += 1
k_0 = n - k_1
if k_0 != k_1:
	print(1)
	print(s)
else:
	st = []
	sht = ''
	for i in s:
		sht += i
	print(2)
	print(sht[0:-1], s[-1])


n = int(input())
s = input()
cnt = [0, 0]
for i in s:
	cnt[int(i)] += 1
if cnt[0] != cnt[1]:
	print(1, s, sep='\n')
else:
	print(2)
	print(s[:-1], s[-1], sep=' ')


n = int(input().strip())
arr = list(map(int, list(input())))
if n == 1:
	print(1)
	print(arr[0])
else:
	ones = arr.count(1)
	zeros = arr.count(0)
	if ones == zeros:
		print(2)
		print(arr[0], ''.join(list(map(str, arr[1:]))))
	else:
		print(1)
		print(''.join(list(map(str, arr))))


n = int(input())
s = str(input())
l1 = []
l2 = []
for i in range(len(s)):
	l1.append(s[i])
a = []
b = l1[0]
if n == 1:
	print('1')
	print(l1[0])
elif n % 2 == 0:
	p = []
	if l1.count('1') != l1.count('0'):
		print('1')
		for i in range(len(l1)):
			print(l1[i], end='')
	else:
		print('2')
		print(l1[0], end=' ')
		for i in range(1, n):
			print(l1[i], end='')
else:
	print('1')
	for i in range(n):
		print(l1[i], end='')


n = int(input())
st = input()
mid = int(n / 2)
count0_l = 0
count1_l = 0
count0_r = 0
count1_r = 0
if n == 1:
	print(1)
	print(st)
	exit()
for i in range(mid):
	if st[i] == '0':
		count0_l += 1
	else:
		count1_l += 1
for i in range(mid, n):
	if st[i] == '0':
		count0_r += 1
	else:
		count1_r += 1
tmp = mid
if count0_l + count0_r == count1_l + count1_r:
	if count0_l != count1_l and count1_r != count0_r:
		print(2)
		print(st[:tmp] + ' ' + st[tmp:n])
		exit()
	while tmp != n:
		if st[tmp] == '0':
			count0_l += 1
			count0_r -= 1
		else:
			count1_l += 1
			count1_r -= 1
		tmp += 1
		if count0_l != count1_l and count1_r != count0_r:
			print(2)
			print(st[:tmp] + ' ' + st[tmp:n])
			exit()
	tmp = mid
	while tmp >= 0:
		if st[tmp] == '0':
			count0_l -= 1
			count0_r += 1
		else:
			count1_l -= 1
			count1_r += 1
		tmp += 1
		if count0_l != count1_l and count1_r != count0_r:
			print(2)
			print(st[:tmp] + ' ' + st[tmp:n])
			exit()
print(1)
print(st)


import sys

def main():
	n_len = int(input())
	s = input().strip()
	if is_good(s):
		print(1)
		print(s)
		return
	else:
		for i in range(len(s)):
			if is_good(s[:i]):
				print(2)
				print(s[:i], s[i:])
				break

def is_good(s):
	one_cnt = 0
	zro_cnt = 0
	for i in s:
		if i == '1':
			one_cnt += 1
		else:
			zro_cnt += 1
		if one_cnt > len(s) / 2 or zro_cnt > len(s) / 2:
			return True
	return False if one_cnt == zro_cnt else True
main()


n = int(input())
s = input()
a = s.count('0')
b = s.count('1')
aa = 0
ab = 0
ba = a
bb = b
if ba != bb:
	print(1)
	print(s)
else:
	for i in range(n):
		if s[i] == '0':
			aa += 1
			ba -= 1
			if aa != ab and ba != bb:
				print(2)
				print(s[0:i + 1], s[i + 1:])
				break
		else:
			ab = +1
			bb -= 1
			if aa != ab and ba != bb:
				print(2)
				print(s[0:i + 1], s[i + 1:])
				break


n = int(input())
s = input()
o = s.count('1')
if o == n - o:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
one = 0
two = 0
for i in s:
	if i == '1':
		one += 1
	else:
		two += 1
if one == two:
	one = 0
	two = 0
	i = 0
	while one == two:
		if s[i] == '1':
			one += 1
		else:
			two += 1
		i += 1
	print(2)
	print(s[:i], s[i:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
zero = s.count('0')
one = n - zero
if zero != one:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


input()
s = str(input())
if s.count('0') == s.count('1'):
	print(2)
	print(s[0] + ' ' + s[1:len(s)])
else:
	print(1)
	print(s)


from collections import Counter
import sys
_ = input()
s = input()
c = Counter(s)
(o, z) = (c['1'], c['0'])
if o == 0 or z == 0:
	print(1)
	print(s)
	sys.exit(0)
if o != z:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = str(input())

def is_good(s):
	l = len(s)
	ones = 0
	for i in s:
		if i == '1':
			ones += 1
	zeros = l - ones
	if zeros == ones:
		return False
	else:
		return True
nsplits = 0
splits = []

def keanu(n, s):
	global nsplits
	global splits
	if n == 1:
		nsplits += 1
		splits.append(s)
	else:
		for i in range(n):
			j = s[0:n - i]
			if is_good(j):
				nsplits += 1
				splits.append(j)
				keanu(len(s[n - i:]), s[n - i:])
				break
			else:
				continue
keanu(n, s)
print(nsplits)
for split in splits:
	print(split, end=' ')


n = int(input())
an = input()
array = []
top = ''
for i in range(n):
	array.append(an[i])
	if i != 0:
		top += array[i]
if array.count('1') != array.count('0'):
	print(1)
	print(array[0] + top)
	quit()
else:
	print('2')
	print(array[0], top)


n = int(input())
word = input()
if len(word[1:]) == 0:
	print(1)
	print(word[0], word[1:])
else:
	x = word.count('0')
	y = word.count('1')
	if x != y:
		print(1)
		print(word)
	else:
		print(2)
		print(word[0], word[1:])


import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline()

def good(s, l):
	count = 0
	n = int(s, 2)
	while n:
		count += 1
		n &= n - 1
	return count != l - count
if n % 2 != 0:
	print(1)
	print(s)
elif not good(s, n):
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
x = s.count('0')
y = s.count('1')
if x != y:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[n - 1])


x = int(input())
y = input()
a = 0
for i in y:
	if i == '0':
		a += 1
	else:
		a -= 1
if a != 0:
	print('1' + '\n' + y)
else:
	print('2' + '\n' + y[0:-1] + ' ' + y[-1])


n = int(input())
s = str(input())
a = len([x for (x, d) in enumerate(s) if d == '1'])
b = len([x for (x, d) in enumerate(s) if d == '0'])
if a != b:
	print('1')
	print(s)
else:
	g = ''
	j = 0
	t = []
	count = 0
	while j < n:
		if s[j] == '0':
			b = b - 1
			g = g + s[j]
			if b != a:
				count = count + 2
				t.append(g)
				g = ''
				for i in range(j + 1, n):
					g = g + s[i]
				t.append(g)
				break
		else:
			a = a - 1
			g = g + s[j]
			if a != b:
				count = count + 2
				t.append(g)
				g = ''
				for i in range(j + 1, n):
					g = g + s[i]
				t.append(g)
				break
		j = j + 1
	print(count)
	print(*t, sep=' ')


n = int(input())
s = input()
a = [0] * 2
for i in range(n):
	a[int(s[i])] += 1
if a[0] == a[1]:
	print(2)
	print(s[0] + ' ' + s[1:])
else:
	print(1)
	print(s)


x = int(input())
s = input()
even = False
if x % 2 == 0:
	even = True
one = 0
zero = 0
for i in s:
	if i == '0':
		zero = zero + 1
	else:
		one = one + 1
if x == 1:
	print('1')
	print(s)
elif zero != one:
	print('1')
	print(s)
elif even and zero == one:
	print('2')
	print(s[0], s[1:x])


n = int(input())
a = input()
(q, z) = (0, 0)
if '1' in a:
	z = a.count('1')
if '0' in a:
	q = a.count('0')
if z != q:
	print(1)
	print(a)
else:
	print(2)
	print(a[0], a[1:])


n = input()
s = str(input())
if s.count('0') == s.count('1'):
	print(2, '\n', s[0], s[1:])
else:
	print(1, '\n', s)


n = int(input())
s = input()
(z, o) = (0, 0)
for i in range(len(s)):
	if s[i] == '0':
		z += 1
	else:
		o += 1
if z != o:
	print(1, s, sep='\n')
else:
	print(2)
	print(s[0:-1], s[-1])


n = int(input())
str = input()

def isGood(str):
	count0 = len([x for x in str if x == '0'])
	count1 = len([x for x in str if x == '1'])
	return count0 != count1

def isTwoParts(str):
	for i in range(0, len(str) - 1):
		str1 = str[0:i + 1]
		str2 = str[i + 1:len(str)]
		if isGood(str1) and isGood(str2):
			print(2)
			print(str1, str2)
			return True
if isGood(str):
	print(1)
	print(str)
elif not isTwoParts(str):
	print(3)
	print(str[0:len(str) - 2], str[len(str - 2)], str[len(str - 1)])


n = int(input())
a = input()
if a.count('0') != a.count('1'):
	print(1)
	print(a)
else:
	print(2)
	for i in range(n):
		if a[:i].count('0') != a[:i].count('1') and a[i:].count('0') != a[i:].count('1'):
			print(a[:i], a[i:])
			break


n = int(input())
s = list(input())
if s.count('0') == s.count('1'):
	print(2)
	print(''.join(s[0:n - 1]) + ' ' + s[-1])
else:
	print(1)
	print(''.join(s))


n = int(input())
s = input()
bal = 0
for var in s:
	if var == '0':
		bal += 1
	else:
		bal -= 1
if bal != 0:
	print('1' + '\n' + s)
else:
	print('2' + '\n' + s[0:-1] + ' ' + s[-1])


n = int(input())
s = input()
k = 0
binCnt = 0
for x in s:
	if x == '0':
		binCnt += 1
	else:
		binCnt -= 1
if binCnt != 0:
	k = 1
	print(k)
	print(s)
else:
	k = 2
	print(k)
	print(s[0:1] + ' ' + s[1:len(s) + 1])


x = int(input())
string = input()
if x % 2:
	print(1)
	print(string)
elif string.count('1') != string.count('0'):
	print(1)
	print(string)
else:
	print(2)
	print(string[0], string[1:])


n = int(input())
s = input()
if n == 1:
	print('1')
	print(s)
else:
	(e, o) = (0, 0)
	k = 1
	for i in range(n):
		if s[i] == '1':
			e += 1
		else:
			o += 1
	if o != e:
		print(k)
		print(s)
	else:
		x = 0
		k = 2
		while o == e:
			x += 1
			s1 = s[:x]
			(e, o) = (0, 0)
			for i in range(x, n):
				if s[i] == '1':
					e += 1
				else:
					o += 1
			if o != e:
				print(k)
				print(s1, s[x:])


import math
a1 = 0
a0 = 0
q = int(input())
q1 = q - 1
b = str(input())
for i in range(q):
	if b[i] == '0':
		a0 = a0 + 1
	else:
		a1 = a1 + 1
if a1 == a0:
	print('2')
	print(b[:q1], b[q - 1], end='')
if a1 != a0:
	print('1')
	print(b)


n = int(input())
s = input()
ke = 0
for i in range(n):
	if s[i] == '1':
		ke += 1
kn = n - ke
if kn != ke:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1])
	print(s[n - 1])


(a, st) = (int(input()), input())
f = 0
for x in st:
	if x == '0':
		f += 1
n = a - f
l = k = 0
if n == f:
	print(2)
	print(st[0], end=' ')
	for x in range(1, a):
		print(st[x], end='')
else:
	print(1)
	print(st)


i = int(input())
n = list(map(int, input()))
if n.count(1) == n.count(0):
	print(2)
	print(n[0], end=' ')
	for i in range(1, len(n)):
		print(n[i], end='')
else:
	print(1)
	for i in range(len(n)):
		print(n[i], end='')


n = int(input())
b = list(map(int, input()))
if b.count(0) != b.count(1):
	print(1)
	print(*b, sep='')
else:
	print(2)
	print(b[0], end=' ')
	print(*b[1:], sep='')


n = int(input())
s = input()
count1 = 0
count0 = 0
for i in range(n):
	if s[i] == '0':
		count0 += 1
	else:
		count1 += 1
if count0 != count1:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


import sys
from operator import itemgetter
input = sys.stdin.readline
from collections import defaultdict as dc
from bisect import bisect_left, bisect_right
import math
n = int(input())
s = input()[:-1]
a = s.count('1')
b = s.count('0')
if a != b:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


def good(a):
	(p, q) = (0, 0)
	for x in a:
		if x == '1':
			p += 1
		else:
			q += 1
	if p != q:
		return True
	else:
		return False

def sol(a):
	if good(a):
		print(1)
		print(''.join(a))
		return
	else:
		print(2)
		print(a[0] + ' ' + ''.join(a[1:len(a)]))
n = int(input())
a = list(input())
sol(a)


import sys
n = int(input())
s = input()
c1 = 0
for c in s:
	c1 += 1 if c == '1' else 0
c0 = len(s) - c1
if c1 != c0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


largo = int(input(''))
binario = input('')
ceros = 0
unos = 0
for caracter in binario:
	if caracter == '0':
		ceros += 1
	else:
		unos += 1
good = False
if ceros != unos:
	good = True
if largo == 1 or good == True:
	print(1)
	print(binario)
else:
	s1 = binario[0]
	s2 = binario[1:largo]
	ceros = 0
	unos = 0
	for caracter in s2:
		if caracter == '0':
			ceros += 1
		else:
			unos += 1
	if ceros == unos:
		s1 = binario[0] + binario[1]
		s2 = binario[2:largo]
	print(2)
	print(s1 + ' ' + s2)


import collections
import math
import sys
import itertools
import itertools

def sa(Type=int):
	return [Type(x) for x in input().split()]

def isGood(s):
	oneCc = 0
	zeroCc = 0
	for x in s:
		if x == '1':
			oneCc += 1
		else:
			zeroCc += 1
	return oneCc != zeroCc

def solve(t):
	n = int(input())
	s = input()
	if isGood(s):
		print(1)
		print(s)
		return
	print(2)
	print(s[0], s[1:])
solve(0)


n = int(input())
s = input()
ones = 0
zeroes = 0
for i in s:
	if i == '1':
		ones = ones + 1
	else:
		zeroes = zeroes + 1
if ones != zeroes:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


input()
s = input()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
orig = input()
string = list(orig)
ones = 0
zeros = 0
for i in string:
	if i == '1':
		ones += 1
	else:
		zeros += 1
if zeros == ones:
	ans = f'{orig[:-1]} {orig[n - 1]}'
	print('2')
	print(ans)
else:
	print('1')
	print(orig)


n = int(input())
s = input()
u = s.count('1')
v = s.count('0')
if n % 2 == 1:
	print(1)
	print(s)
elif int(u) == int(v):
	print(2)
	print(s[:1] + ' ' + s[1:])
else:
	print(1)
	print(s)


from collections import Counter
n = int(input())
s = input()
temp = s
s = Counter(s)
if s['1'] != s['0']:
	print(1)
	print(temp)
else:
	print(2)
	print(temp[:n - 1] + ' ' + temp[-1])


n = int(input())
a = input()
a = list(a)
if a.count('0') != a.count('1'):
	b = ''.join(a)
	print('1')
	print(b)
else:
	b = ''.join(a[:n - 1])
	print('2')
	print(b, a[n - 1])


n = int(input())
s = input()
good = lambda x: x.count('1') != x.count('0')
if good(s):
	print(1)
	print(s)
	exit()
for i in range(1, n):
	if good(s[:i]) and good(s[i:]):
		print(2)
		print(s[:i], s[i:])
		exit()


n = int(input())
a = list(input())
cnt = 0
for i in range(1, 10):
	cnt += 1
z = 0
cnt = 0
for i in range(1, 10):
	cnt += 1
o = 0
cnt = 0
for i in range(1, 10):
	cnt += 1
for i in range(n):
	if a[i] == '0':
		z += 1
	else:
		o += 1
cnt = 0
for i in range(1, 10):
	cnt += 1
cnt = 0
for i in range(1, 10):
	cnt += 1
if z == o:
	print(2)
	print(''.join(a[:n - 1]), ''.join(a[n - 1:]))
else:
	print(1)
	print(''.join(a))


from sys import stdin, setrecursionlimit
import math
from bisect import bisect_left
n = int(stdin.readline().strip())
string = stdin.readline().strip()
one = 0
zero = 0
for i in range(n):
	if string[i] == '1':
		one += 1
	else:
		zero += 1
if zero != one:
	print(1)
	print(string)
else:
	print(2)
	print(string[0], string[1:])


n = int(input())
s = input()
co1 = 0
co0 = 0
for i in s:
	if i == '1':
		co1 += 1
	elif i == '0':
		co0 += 1
if co1 != co0:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


from collections import *
l = int(input())
g = input()
doc = Counter(g)
if doc['0'] != doc['1'] or l == 1:
	print(1)
	print(g)
	exit()
lk = [0, 0]
index = 0
for i in range(l):
	if lk[0] != lk[1]:
		index = i
		break
	lk[int(g[i])] += 1
print(2)
print(g[:index], g[index:])


l = int(input())
num = [int(i) for i in list(input())]
ns = [num.count(0), num.count(1)]
if ns[0] != ns[1]:
	print(1)
	print(''.join([str(i) for i in num]))
else:
	print(2)
	print(str(num[0]) + ' ' + ''.join([str(i) for i in num[1:]]))


n = int(input())
s = input()
s1 = s.count('1')
if s1 == n - s1:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


import collections
n = int(input())
s = input()
c = collections.Counter(s)
if c['0'] != c['1']:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


n = int(input())
s = input()
cnt0 = 0
cnt1 = 0
for i in s:
	if i == '0':
		cnt0 += 1
	else:
		cnt1 += 1
if cnt0 != cnt1:
	print('1\n%s' % s)
else:
	print('2\n%s %s' % (s[0], s[1:]))


from sys import stdin
import math

def main():
	lon = int(stdin.readline().strip())
	string = stdin.readline().strip()
	if string.count('1') != string.count('0'):
		print(1)
		print(string)
	else:
		print(2)
		print(string[0:lon - 1], string[lon - 1])
main()


n = int(input())
s = str(input())
zero = 0
one = 0
for c in s:
	if c == '0':
		zero += 1
	else:
		one += 1
if n == 0:
	print(0)
	print('')
elif zero - one != 0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


n = int(input())
s = input()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	print(2)
	print('{} {}'.format(s[0], s[1:]))


n = int(input())
st = input()
x0 = 0
x1 = 0
for i in range(n):
	if st[i] == '0':
		x0 += 1
	else:
		x1 += 1
if x0 != x1:
	print(1)
	print(st)
else:
	print(2)
	print(st[0], end=' ')
	for i in range(1, n):
		print(st[i], end='')
	print()


n = int(input())
input_str = input()

def count_zeros_ones(line):
	counts = [0, 0]
	for el in line:
		if el == '0':
			counts[0] += 1
		else:
			counts[1] += 1
	return counts

def is_good(counts):
	if counts[0] == counts[1]:
		return False
	else:
		return True

def solution(line):
	counts = count_zeros_ones(line)
	if is_good(counts):
		print(1)
		print(line)
		return
	print(2)
	print(line[:1], ' ', line[1:])
solution(input_str)


t = int(input(''))
s = input('')
a = list(s)
z = a.count('0')
o = a.count('1')
if z == o:
	print(2)
	m = a[0]
	del a[0]
	print(m, end=' ')
	for i in range(len(a)):
		print(a[i], end='')
else:
	print(1)
	for i in range(len(a)):
		print(a[i], end='')


n = int(input())
s = input()
count_zero = 0
if n % 2 == 0:
	for i in s:
		if i == '0':
			count_zero += 1
	if count_zero != n / 2:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], s[1:])
else:
	print(1)
	print(s)


n = input()
s = input()
z = 0
nz = 0
for i in s:
	if i == '0':
		z += 1
	else:
		nz += 1
if z != nz:
	print(1)
	print(s)
else:
	print(2)
	for i in range(len(s) - 1):
		print(s[i], end='')
	print(' ', end='')
	print(s[len(s) - 1])


n = int(input())
s = input()
zeroes = s.count('0')
ones = s.count('1')
if zeroes != ones:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


length = int(input())
s = input()
zeroes = 0
ones = 0
sub_s = []
sub_s_count = []
if length % 2 == 1:
	print(1)
	print(s)
else:
	for i in range(length):
		if s[i] == '0':
			zeroes += 1
		else:
			ones += 1
	if zeroes != ones:
		print(1)
		print(s)
	else:
		l_zeroes = 0
		r_zeroes = zeroes
		l_ones = 0
		r_ones = ones
		print(2)
		print(s[0] + ' ' + s[1:length])


a = int(input())
b = str(input())
if a % 2 != 0:
	print(1)
	print(b)
elif b.find('1') == -1 or b.find('0') == -1:
	print(1)
	print(b)
elif b.count('1') != b.count('0'):
	print(1)
	print(b)
else:
	print(2)
	print(b[0], b[1:a])


n = int(input())
str = input()
cont1 = 0
cont0 = 0
ult = ''
list1 = []
for i in range(n):
	if str[i] == '1':
		cont1 += 1
	else:
		cont0 += 1
if cont1 != cont0:
	print(1)
	print(str)
else:
	for i in range(n):
		if str[i] == '1':
			cont1 += 1
		else:
			cont0 += 1
		if cont1 == cont0:
			list1.append(ult)
			ult = ''
			cont1 = 0
			cont2 = 0
		ult += str[i]
	list1.append(ult)
	print(len(list1))
	for i in range(len(list1)):
		if i == n - 1:
			print(list1[i])
		else:
			print(list1[i], end=' ')


input()
s = input()
x = 0
if len(s) % 2 == 1:
	print(1)
	print(s)
else:
	for i in s:
		if i == '1':
			x += 1
	if x == int(len(s) / 2):
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)


n = int(input())
s = str(input())
zero = 0
one = 0
for i in s:
	if i == '0':
		zero += 1
	else:
		one += 1
if zero == one:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


import sys
digits_count = int(input())
digits = input()
if digits_count % 2 == 1:
	print(1)
	print(digits)
	sys.exit()
zeros = 0
ones = 0
for x in digits:
	if x == '0':
		zeros += 1
	else:
		ones += 1
if zeros != ones:
	print('1')
	print(digits)
else:
	print(2)
	print(f'{digits[:1]} {digits[1:]}')


n = int(input())
s = input()
ans = list([])
(ones, zeros, first) = (s.count('1'), s.count('0'), '')
if ones != zeros or len(s) == 1:
	print(1, s, sep='\n')
	exit()
first += s[0]
for i in range(1, n):
	x = len(first)
	if first.count('0') != first.count('1') and s[x:n].count('0') != s[x:n].count('1'):
		print(2)
		print(first, s[x:n])
		break
	else:
		first += s[i]


n = int(input())
s = input()
l = [int(d) for d in str(s)]
x = l.count(0)
y = l.count(1)
if x == y:
	print('2')
	z = l.pop(0)
	print(str(z) + ' ' + s[1:])
else:
	print('1')
	print(s)


n = int(input())
chain = list(input())
nb0 = 0
nb1 = 0
for i in range(n):
	if chain[i] == '0':
		nb0 += 1
	else:
		nb1 += 1
if nb0 != nb1:
	print(1)
	print(''.join(chain))
else:
	print(2)
	print(chain[0], end=' ')
	for i in range(n):
		if i != 0:
			print(chain[i], end='')
	print()


k = int(input())
n = input()
if n.count('0') == n.count('1'):
	print(2)
	print(n[0], n[1:])
else:
	print(1)
	print(n)


def find(s):
	return s.count('0') != s.count('1')
n = int(input())
s = input()
if find(s):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
a = list(map(int, input()))
count_z = a.count(0)
count_one = a.count(1)
if len(set(a)) == 1 or count_z != count_one:
	print(1)
	print(''.join((str(i) for i in a)))
else:
	print(2)
	print(str(a[0]), ''.join((str(i) for i in a[1:])))


n = int(input())
s = input()
if n % 2:
	print(1)
	print(s)
else:
	s1 = s2 = ''
	o = e = 0
	if n // 2 % 2 == 0:
		a = n // 2 + 1
	else:
		a = n // 2
	for i in range(n):
		if s[i] == '0':
			o += 1
		elif s[i] == '1':
			e += 1
		if i < a:
			s1 += s[i]
		else:
			s2 += s[i]
	if o != e:
		print(1)
		print(s)
	else:
		print(2)
		print(s1, s2)


(n, s) = (int(input()), input())
if s.count('0') == s.count('1'):
	print('2\n' + s[0], s[1:])
else:
	print('1\n', s, sep='')


t = int(input())
s = str(input())
one = 0
for i in range(0, len(s), 1):
	if s[i] == '1':
		one += 1
if one * 2 == t:
	print(2)
	print(s[0:t - 1], s[t - 1])
else:
	print(1)
	print(s)


n = int(input())

def good(ar):
	return ar.count('1') != ar.count('0')
s = input()
if good(s):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


from collections import Counter
n = int(input())
l = list(input())
x = Counter(l)
if x['1'] != x['0']:
	print(1)
	print(*l, sep='')
else:
	print(2)
	for i in range(n - 1):
		print(l[i], end='')
	print(' ', l[-1])


n = int(input())
a = list(map(int, input()))
d = {0: 0, 1: 0}
for i in a:
	if i == 0:
		d[0] = d[0] + 1
	else:
		d[1] = d[1] + 1
if d[0] != d[1]:
	print(1)
	for i in a:
		print(i, end='')
else:
	print(2)
	print(a[0], end=' ')
	a.pop(0)
	for i in a:
		print(i, end='')


n = int(input())
s = input()
z = n // 2
a = s.count('0')
b = s.count('1')
if a != b:
	print(1)
	print(s)
else:
	print(2)
	print(s[0:-1], end=' ')
	print(s[-1])


n = int(input())
lst = list(input())
num1 = 0
num0 = 0
for each in lst:
	if each == '0':
		num0 += 1
	else:
		num1 += 1
if num1 != num0:
	print(1)
	print(''.join(lst))
else:
	print(2)
	for i in range(n):
		if num1 - i != num0 - i:
			print(' ' + ''.join(lst[i:]))
			break
		if lst[i] == 0:
			num0 -= 1
		else:
			num1 -= 1
		print(lst[i], end='')


n = int(input())
s = input()
if n == 1:
	print(1)
	print(s)
else:
	(cnt0, cnt1) = (s.count('0'), s.count('1'))
	if cnt0 == cnt1:
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)


def checkGood(n, s):
	count = 0
	for i in range(n):
		count += int(s[i])
	return n != 2 * count
n = int(input())
s = str(input())
if checkGood(n, s) == True:
	print(1)
	print(s)
else:
	print(2)
	print(s[:-1], s[-1])


n = int(input())
String = input()
S = list(String)
k = 0
if n % 2 == 1:
	print(1)
	print(String)
else:
	for i in range(0, n):
		if S[i] == '1':
			k = k + 1
	if k == n / 2:
		if S[n - 1] == 1:
			print(2)
			print(String[:-1], int(S[n - 1]))
		else:
			print(2)
			print(String[:-1], int(S[n - 1]))
	else:
		print(1)
		print(String)


import sys
ii = lambda : sys.stdin.readline().strip()
idata = lambda : [int(x) for x in ii().split()]
n = int(ii())
s = ii()
flag = True
if n % 2 == 0:
	(a, b) = (0, 0)
	for i in range(n):
		if int(s[i]):
			a += 1
		else:
			b += 1
	if a == b:
		print(2)
		print(s[:-1], s[-1])
		flag = False
if flag:
	print(1)
	print(s)


(a, b) = (int(input()), input())
if b.count('0') == b.count('1'):
	print(2)
	print(b[0], b[1:])
else:
	print(1)
	print(b)


import sys
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
lens = RI()
seq = RW()
balance = 0
for i in seq:
	if i == '1':
		balance += 1
	else:
		balance -= 1
if balance != 0:
	print(1)
	print(seq)
else:
	print(2)
	print(seq[:-1], seq[-1])


a = int(input())
b = input()
if len(b) == 1:
	print(1)
	print(b)
elif b.count('1') and (not b.count('0')) or (b.count('0') and (not b.count('1'))):
	print(1)
	print(b)
elif b.count('1') != b.count('0'):
	print(1)
	print(b)
else:
	for i in range(1, a + 1):
		s1 = b[:i]
		s2 = b[i:]
		if s1.count('1') != s1.count('0') and s2.count('1') != s2.count('0'):
			print(2)
			print(s1, s2)
			break


n = int(input())
s = str(input())
co = 0
cz = 0
for i in range(n):
	if s[i] == '1':
		co += 1
	else:
		cz += 1
if cz != co:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1] + ' ' + s[n - 1])


n = int(input())
try:
	while True:
		s = input()
		if len(s) > 0:
			continue
		else:
			break
except EOFError:
	pass
count1 = 0
count2 = 0
for i in range(len(s)):
	if s[i] == '0':
		count1 += 1
	else:
		count2 += 1
if count1 != count2:
	print('1')
	print(s)
else:
	print('2')
	print(s[:-1], end=' ')
	print(s[-1])


n = int(input())
s = input()
k1 = 0
k2 = 0
for i in range(n):
	if s[i] == '0':
		k1 += 1
	else:
		k2 += 1
if k1 == k2:
	print(2)
	print(s[0:n - 1], s[len(s) - 1])
else:
	print(1)
	print(s)


def solve():
	n = int(input())
	s = input()
	li = list(map(int, list(s)))
	if n % 2 == 1 or sum(li) != n / 2:
		print(1)
		print(s)
	else:
		print(2)
		print('{} {}'.format(s[0], s[1:]))
solve()


def good(word):
	if word == '':
		return False
	import collections
	counts = collections.Counter(word)
	if counts['0'] == counts['1']:
		return False
	else:
		return True

def cuts(n, word, selected):
	mini = n
	temp_mini = n
	for i in range(n, 0, -1):
		if good(word[:i]):
			temp_selected = [word[:i]]
			(m, s) = cuts(n - i, word[i:], temp_selected + [word[i:]])
			mini = min(mini, 1 + m)
			if mini < temp_mini:
				selected = s
			print(mini, temp_mini, s, selected)
			temp_mini = mini
	return (mini, selected)

def cuts2(n, word, words):
	select = list(word)
	for i in range(n, 0, -1):
		if good(word[:i]):
			if not words:
				words = [word[:i]]
			else:
				words.append(word[:i])
			cuts2(n - i, word[i:], words)
			if len(words) < len(select):
				select = words
				return select
			else:
				break
	return select

def main():
	n = int(input())
	string = str(input())
	select = string
	res1 = cuts2(n, string, [])
	print(len(res1))
	for r in res1:
		if r:
			print(r, end=' ')
main()


ln = int(input())
ar = input()
cnt = [0, 0]
cnt[1] = ar.count('1')
cnt[0] = ln - cnt[1]
mid = 0
while cnt[0] == cnt[1]:
	mid += 1
	cnt[int(ar[mid - 1])] -= 1
if mid != 0:
	print('2')
	print(ar[:mid], end=' ')
else:
	print('1')
print(ar[mid:])


n = int(input())
a = input()
if len(a) % 2 == 1:
	print(1)
	print(a)
else:
	(z, o) = (0, 0)
	for i in a:
		if i == '0':
			z += 1
		else:
			o += 1
	if o != z:
		print(1)
		print(a)
	elif n // 2 % 2 == 0:
		print(2)
		print(a[:n // 2 + 1], a[n // 2 + 1:])
	else:
		print(2)
		print(a[:n // 2], a[n // 2:])


n = int(input())
inp = input()
if n == 1:
	print('1 \n' + inp)
elif n % 2 == 0:
	if inp.count('1') != inp.count('0'):
		print('1 \n' + inp)
	else:
		print('2 \n' + inp[:n - 1] + ' ' + inp[n - 1])
elif n % 2 == 1:
	print('1 \n' + inp)


n = input()
Str = input()
ones = Str.count('1')
zeros = Str.count('0')
if ones == zeros:
	print(2)
	print(Str[0], Str[1:])
else:
	print(1)
	print(Str)


n = int(input())
a = list(input())
o = 0
e = 0
for i in range(n):
	if a[i] == '1':
		o += 1
	else:
		e += 1
if e == o:
	print(2)
	print(a[0], end=' ')
	for i in range(1, len(a)):
		print(a[i], end='')
else:
	print(1)
	for i in a:
		print(i, end='')


n = input()
s = input()
ones = 0
zeros = 0
for c in s:
	if c == '0':
		zeros += 1
	else:
		ones += 1
if zeros != ones:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


def is_good(string):
	(zeros, ones) = (0, 0)
	for c in string:
		if c == '0':
			zeros += 1
		else:
			ones += 1
	return zeros != ones
input()
s = input()
if is_good(s):
	print(1)
	print(s)
else:
	(zeros, ones) = (0, 0)
	i = 0
	for i in range(len(s)):
		if s[i] == '0':
			zeros += 1
		else:
			ones += 1
		if zeros != ones:
			break
	print(2)
	print(s[:1] + ' ' + s[1:])


n = int(input())
b = input()
a = list(b)
q = 0
j = 0
for i in a:
	if i == '1':
		q = q + 1
	else:
		j = j + 1
if q == j:
	print(2)
	print(b[0], end=' ')
	print(b[1:])
else:
	print(1)
	print(b)


while True:
	try:
		(n, s) = (input(), input())
		cunt = len([x for x in s if x == '1'])
		leng = len(s)
		if cunt == 0 or leng == 1:
			print('1\n' + s)
		elif leng - cunt == cunt:
			print('2\n' + s[0], s[1:])
		else:
			print('1\n' + s)
	except EOFError:
		break


(n, a) = (int(input()), [i for i in input()])
if a.count('1') == a.count('0'):
	print(2)
	print(a[0] + ' ' + ''.join([a[i] for i in range(len(a)) if i != 0]))
else:
	print(1)
	print(''.join(a))


def kiany(n, s):
	(zeros, ones) = (s.count('0'), s.count('1'))
	if zeros != ones:
		return (1, s)
	return (2, s[0], s[1:])
m = int(input())
t = input()
z = kiany(m, t)
x = len(z)
if x == 2:
	print(z[0])
	print(z[1])
if x == 3:
	print(z[0])
	print(z[1], z[2])


n = int(input())
x = input()
if x.count('0') == x.count('1'):
	a = x[-1:]
	b = x[:-1]
	print(2)
	print(b, a)
else:
	print(1)
	print(x)


from sys import stdin, stdout
import collections
import heapq
import itertools
import functools
import math
import operator
import string
ALPHABET = string.ascii_lowercase
DIGITS = string.digits

def read_line():
	return stdin.readline().strip()

def read_int():
	return int(read_line())

def read_arr():
	return read_line().split(' ')

def read_int_arr():
	return [int(x) for x in read_arr()]

def query_interactive(s):
	print(s)
	stdout.flush()

def solve():
	n = read_int()
	s = read_line()
	(oc, zc) = (0, 0)
	for c in s:
		if c == '0':
			zc += 1
		else:
			oc += 1
	if oc == zc:
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)

def main():
	T = 1
	for _ in range(T):
		solve()
main()


n = int(input())
s = input()
k = s.count('1')
if n - k != k:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[-1])


import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline().strip()
ans = 1
n0 = 0
n1 = 0
for num in s:
	if num == '0':
		n0 += 1
	elif num == '1':
		n1 += 1
if n0 == n1:
	ans = 2
	print(ans)
	print(s[0:-1], s[-1])
else:
	print(ans)
	print(s)


n = int(input())
s = input()
q = s.count('0')
w = n - q
if q == w:
	qw = [s[0], s[1:]]
else:
	qw = [s]
print(len(qw))
print(*qw)


k = int(input())
n = list(input())
a = n.count('0')
b = n.count('1')
if k % 2 != 0 or a != b:
	print('1')
	print(''.join(n))
else:
	print('2')
	print(n[0], end=' ')
	n.remove(n[0])
	print(''.join(n))


n = int(input())
s = input()

def check(a):
	for i in range(len(a)):
		t = a[i]
		n0 = 0
		n1 = 0
		for j in range(len(t)):
			if t[j] == '1':
				n1 += 1
			else:
				n0 += 1
		if n0 == n1:
			return False
	return True

def cut(prev, s, a):
	if a == 1:
		if check(prev + [s]):
			print(len(prev + [s]))
			print(*prev, s)
			raise SystemExit
		return
	for i in range(len(s) - a + 1):
		cut(prev + [s[:i + 1]], s[i + 1:], a - 1)
for i in range(1, n + 1):
	cut([], s, i)


def is_good(s):
	if len(s) % 2 == 1:
		return True
	o = 0
	z = 0
	for i in s:
		if i == '0':
			o += 1
		else:
			z += 1
	return o != z
n = int(input())
s = input()
if is_good(s):
	print(1)
	print(s)
else:
	t = len(s) / 2
	print(2)
	print(s[:1] + ' ' + s[1:])


from sys import stdin
from typing import List

def are_zeroes_and_ones_equal(s: str) -> bool:
	count_zeroes = len([z for z in s if z == '0'])
	count_ones = len([o for o in s if o == '1'])
	return count_zeroes == count_ones

def split(remaining: str, completed: List[str]=[]) -> List[str]:
	if not remaining:
		return completed
	end = len(remaining)
	while are_zeroes_and_ones_equal(remaining[:end]):
		end -= 1
	return split(remaining[end:], completed + [remaining[:end]])
stdin.readline()
input_str = stdin.readline().strip()
result = split(input_str)
print(len(result))
print(' '.join(result))


n = int(input())
s = input()
k = 0
z = 0
for i in s:
	if i == '1':
		k = k + 1
	else:
		z = z + 1
if k == z:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
string = input()
if string.count('0') != string.count('1'):
	print(1)
	print(string)
else:
	print(2)
	print(f'{string[0]} {string[1:]}')


_ = input()
string = input().strip()
(a, b) = (0, 0)
for i in string:
	if i == '1':
		b += 1
	else:
		a += 1
if a != b:
	print(1)
	print(string)
else:
	print(2)
	print(string[0], string[1:])


n = int(input())
s = str(input())
c0 = 0
c1 = 0
for i in range(n):
	if s[i] == '0':
		c0 += 1
	else:
		c1 += 1
if c1 != c0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


def isGood(s):
	n = len(s)
	if n & 1:
		return True
	count = 0
	for i in range(n):
		if s[i] == '1':
			count += 1
	return count != n / 2

def compute(s):
	if isGood(s):
		return '1\n' + s
	return '2\n' + s[0] + ' ' + s[1:]
input()
s = input()
print(compute(s))


from collections import defaultdict
import sys
input = sys.stdin.readline
inf = 100000000000000000
mod = 998244353
n = int(input())
S = input().strip()
if S.count('1') == S.count('0'):
	print(2)
	print(S[0], S[1:])
else:
	print(1)
	print(S)


N = int(input())
S = input()
n0 = sum((c == '0' for c in S))
n1 = N - n0
if n0 == n1:
	print('2')
	print(S[0], S[1:])
else:
	print('1')
	print(S)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

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

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		n = I()
		s = S()
		c = collections.Counter(s)
		if len(c) == 2 and len(set(c.values())) == 1:
			rr.append(2)
			rr.append(JA([s[:1], s[1:]], ' '))
		else:
			rr.append(1)
			rr.append(s)
	return JA(rr, '\n')
print(main())


from collections import Counter, defaultdict
n = int(input())
arr = list(input())
c = dict(Counter(arr))
if c.get('0', 0) != c.get('1', 0):
	print(1)
	print(''.join(arr))
else:
	print(2)
	print(''.join(arr[:-1]), end=' ')
	print(arr[-1])


strlen = int(input())
new_str = input()
count_zeros = new_str.count('0')
if strlen - count_zeros == strlen / 2:
	print(2)
	print(new_str[0:strlen - 1], end=' ')
	print(new_str[strlen - 1])
else:
	print(1)
	print(new_str)


from sys import *
n = int(stdin.readline())
a = list(map(int, input()))
e = 0
o = 0
for i in range(n):
	if a[i] == 0:
		o += 1
	else:
		e += 1
if o != e:
	print(1)
	print(*a, sep='')
else:
	print(2)
	x = a.pop(0)
	print(x, end=' ')
	print(*a, sep='')


n = input()
l = str(input())
(ones, zero) = (len([c for c in l if c == '1']), len([c for c in l if c == '0']))
if ones == zero:
	print(2)
	print(l[:-1] + ' ' + l[-1:])
else:
	print(1)
	print(l)


n = int(input())
s = input()
a = s.count('1')
b = s.count('0')
if b != a:
	print(1)
	print(s)
else:
	print(2)
	s = list(s)
	print(s[0], end=' ')
	del s[0]
	d = ''.join(s)
	print(d)


tam = int(input())
s = input()
o = s.count('1')
z = s.count('0')
if o != z:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
c_o = s.count('1')
c_z = s.count('0')
if c_o != c_z:
	print(1)
	print(s)
	exit()
print(2)
print(s[0], s[1:])
exit()
current = 0
if s[0] == '1':
	c_o -= 1
	current += 1
else:
	c_z -= 1
	current -= 1
i = 1
while current == 0 or (c_o == c_z and i < n):
	if s[i] == '1':
		c_o -= 1
		current += 1
	else:
		c_z -= 1
		current -= 1
	i += 1
if current == 0 and c_o == c_z:
	print(3)
	print(s[0], s[1:-1], s[-1])
else:
	print(2)
	print(s[:i], s[i:])


n = int(input())
s = input()
num1 = s.count('0')
num2 = n - num1
if num1 != num2:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
a = s.count('0')
b = n - a
if a == b:
	res = [s[0], s[1:]]
else:
	res = [s]
print(len(res))
print(*res)


def check_good(line):
	zero_counter = 0
	one_counter = 0
	for s in line:
		if s == '0':
			zero_counter += 1
		else:
			one_counter += 1
	if zero_counter != one_counter:
		return True
	else:
		return False
amount = int(input())
line = input()
if amount % 2 != 0:
	print(1)
	print(line)
elif check_good(line):
	print(1)
	print(line)
else:
	print(2)
	print(line[0], end=' ')
	print(line[1:amount])


a = int(input())
s = input()
(e, n) = (0, 0)
for i in s:
	if i == '1':
		e += 1
	else:
		n += 1
if n == e:
	print(2)
	print(s[:-1], s[len(s) - 1])
else:
	print(1)
	print(s)


n = int(input())
s = input()
c0 = s.count('0')
c1 = s.count('1')
if c0 != c1:
	print('1')
	print(s)
else:
	print('2')
	t = ''
	for i in range(1, n):
		t += s[i]
	print(s[0], t)


n = int(input())
gstr = str(input())
if len(gstr) % 2 != 0:
	print(1)
	print(gstr)
elif gstr.count('1') != gstr.count('0'):
	print(1)
	print(gstr)
else:
	print(2)
	print(gstr[0:-1], gstr[-1])


n = int(input())
s = input()
count_1 = 0
count_0 = 0
for ch in s:
	if ch == '0':
		count_0 += 1
	else:
		count_1 += 1
if count_0 != count_1:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


from sys import stdin, stdout
from math import gcd
import math
from collections import defaultdict
input = stdin.readline
print = stdout.write

def check(s):
	one = 0
	zero = 0
	for i in s:
		if i == '1':
			one += 1
		elif i == '0':
			zero += 1
	return zero == one

def fun(s):
	if check(s):
		print(str(2) + '\n' + str(s[0]) + ' ' + str(s[1:]) + '\n')
	else:
		print(str(1) + '\n' + str(s) + '\n')
n = int(input())
s = input()
fun(s)


n = int(input())
d = [int(x) for x in list(input())]
if len(d) == 1:
	print(1)
	print(d[0])
	exit(0)
if d.count(0) != len(d) - d.count(0):
	print(1)
	for x in d:
		print(x, end='')
	exit(0)
result = []
count = 2
while True:
	for i in range(0, n - 1):
		left = d[:i + 1]
		right = d[i + 1:]
		nleft = left.count(0)
		nright = right.count(0)
		if len(left) - nleft != nleft and len(right) - nright != nright:
			print(count)
			result.append(left)
			result.append(right)
			for x in result:
				for y in x:
					print(y, end='')
				print(' ', end='')
			exit(0)
	result.append(d[0:1])
	d[0:1] = []
	count += 1


n = int(input())
l = input()
if '0' in l and '1' in l and (l.count('0') == l.count('1')):
	print(2)
	print(l[0], l[1:])
else:
	print(1)
	print(l)


x = int(input())
str = input()
if str.count('0') == str.count('1'):
	print(2)
	print(str[0], str[1:])
else:
	print(1)
	print(str)


n = int(input())
s = input()
n1 = s.count('1')
n2 = s.count('0')
if n1 == n2:
	print(2)
	print(s[0] + ' ' + s[1:])
else:
	print(1)
	print(s)


n = int(input())
a = input()
one = 0
zero = 0
for v in a:
	if v == '0':
		one += 1
	else:
		zero += 1
if one != zero:
	print(1)
	print(a)
else:
	print(2)
	print(a[:len(a) - 1], a[-1])


n = int(input())
str = input()
count = 0
counter = 0
for i in range(0, n):
	if str[i] == '0':
		count = count + 1
	else:
		counter = counter + 1
if count == counter:
	print(2)
	print(str[0] + ' ' + str[1:])
else:
	print(1)
	print(str)


input()
x = input()
if x.count('0') == x.count('1'):
	print(2, '\n', x[0], x[1:])
else:
	print(1, '\n', x)


n = int(input())
a = input()
if a.count('1') == a.count('0'):
	print(2)
	print(a[0], a[1:])
else:
	print(1)
	print(a)


n = int(input())
s = input()
ones = list()
zero = list()
on = 0
ze = 0
if s.count('1') != s.count('0'):
	print(1)
	print(s)
	exit()
for i in range(0, n):
	if s[i] == '1':
		on = on + 1
		ones.append(on)
		zero.append(ze)
	else:
		ze = ze + 1
		zero.append(ze)
		ones.append(on)
total_ones = ones[-1]
total_zero = zero[-1]
for i in range(0, n):
	if zero[i] != ones[i] and total_ones - ones[i] != total_zero - zero[i]:
		print(2)
		print(s[0:i + 1], s[i + 1:])
		break


n = int(input())
s = input()
arr = []
o = 0
z = 0
for i in range(n):
	if int(s[i]) == 1:
		o += 1
	else:
		z += 1
if o != z:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


from collections import Counter
n = int(input())
st = input().lstrip()
count = Counter(st)
l = len(st)
if '0' in st and '1' in st:
	if count['0'] != count['1']:
		print('1', st, sep='\n')
	else:
		print('2', st[:l - 1], st[l - 1:], sep='\n')
else:
	print('1', st, sep='\n')


t = int(input())
n = input()
ones = n.count('1')
zeros = n.count('0')
if ones != zeros:
	print('1')
	print(n)
else:
	first_half = n[:len(n) // 2]
	second_half = n[len(n) // 2:]
	ones_first = first_half.count('1')
	zeros_first = first_half.count('0')
	ones_second = second_half.count('1')
	zeros_second = second_half.count('0')
	if ones_first != zeros_first and ones_second != zeros_second:
		print('2')
		print(first_half, second_half)
	else:
		first_half = n[:len(n) // 2 + 1]
		second_half = n[len(n) // 2 + 1:]
		print('2')
		print(first_half, second_half)


n = int(input())
s = input()
count = 0
for c in s:
	if c == '0':
		count += 1
	else:
		count -= 1
if count != 0:
	print('1' + '\n' + s)
else:
	print('2' + '\n' + s[0:-1] + ' ' + s[-1])


n = int(input())
s = input()
zeroCount = 0
oneCount = 0
zeroCount = s.count('0')
oneCount = s.count('1')
if n % 2 != 0:
	print(1)
	print(s)
elif oneCount == zeroCount:
	print(2)
	print(s[0] + ' ' + s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
l = []
for i in s:
	l.append(int(i))
one = l.count(1)
zero = l.count(0)
if one != zero:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:], sep=' ')


n = int(input())
str = input()
if str.count('0') == str.count('1'):
	print(2)
	print(str[0], str[1:])
else:
	print(1)
	print(str)


n = int(input())
s = input()
slice = ''
slices = ''
slicess = ''
if n == 1:
	print(1)
	print(s)
elif s.count('0') == 0 or s.count('1') == 0:
	print(1)
	print(s)
elif s.count('0') != s.count('1'):
	print(1)
	print(s)
elif n == 2:
	print(2)
	print(s[:1] + ' ' + s[1:])
elif n > 2:
	for i in range(len(s)):
		slice = s[:i]
		slices = s[i:]
		if slice.count('0') == slice.count('1') or slices.count('0') == slices.count('1'):
			continue
		else:
			print(2)
			print(slice + ' ' + slices)
			break
else:
	inx = 1
	for i in range(len(s)):
		slice = s[:i]
		slicess = s[i:i + inx]
		slices = s[i + inx:]
		inx += 1
		if slice.count('0') == slice.count('1') or slices.count('0') == slices.count('1'):
			if slicess.count('0') == slicess.count('1'):
				continue
		else:
			print(3)
			print(slice + ' ' + slicess + ' ' + slices)
			break


n = int(input())
s = list(input())
for i in range(n):
	s[i] = int(s[i])
if sum(s) != len(s) // 2 or len(s) % 2 == 1:
	print(1)
	for i in s:
		print(i, end='')
else:
	s1 = s[:len(s) // 2]
	s2 = s[len(s) // 2:]
	print(2)
	if len(s1) % 2 == 0:
		for i in range(n // 2 - 1):
			print(s1[i], end='')
		print(' ', s1[-1], end='')
		for i in s2:
			print(i, end='')
	else:
		for i in s1:
			print(i, end='')
		print(end=' ')
		for i in s2:
			print(i, end='')


n = int(input())
s = str(input())
a = s.count('0')
b = s.count('1')
if a == b:
	print(2)
	print(s[0], s[1:n])
else:
	print(1)
	print(s)


import sys

def main():
	strlen = int(sys.stdin.readline().rstrip())
	string = sys.stdin.readline().rstrip()
	zeroes = 0
	ones = 0
	out_strs = []
	if strlen % 2 == 1:
		out_strs.append(string)
	else:
		for i in range(len(string)):
			if string[i] == '0':
				zeroes += 1
			else:
				ones += 1
		if zeroes != ones:
			out_strs.append(string)
		else:
			out_strs.append(string[0])
			out_strs.append(string[1:])
	print(len(out_strs))
	for item in out_strs:
		print(item, end=' ')
main()


for _ in range(1):
	n = int(input())
	s = input()
	cou1 = cou2 = 0
	for x in s:
		if x == '1':
			cou1 += 1
		else:
			cou2 += 1
	if cou1 == cou2 and n != 1:
		print(2)
		print(s[:-1], s[-1])
	else:
		print(1)
		print(s)


n = int(input())
s = input()
c = 0
if n % 2 == 0:
	for i in range(0, len(s)):
		if s[i] == '1':
			c += 1
	if c == n / 2:
		print('2')
		print(s[0], s[1:], sep=' ')
	else:
		print('1')
		print(s)
else:
	print('1')
	print(s)


l = int(input())
s = list(input())
one = s.count('1')
zero = s.count('0')
if one != zero:
	print(1)
	print(''.join(s))
else:
	print(2)
	print(''.join(s[:l - 1]), end=' ')
	print(''.join(s[l - 1:]))


n = input()
s = input()
count1 = 0
count2 = 0
for i in s:
	if i == '0':
		count1 += 1
	else:
		count2 += 1
if count1 != count2:
	print('1')
	print(s)
else:
	print('2')
	print(s[0:int(n) - 1] + ' ' + s[int(n) - 1])


import sys
import math, bisect
sys.setrecursionlimit(10 ** 6)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict

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

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

def Neo():
	return list(map(int, sys.stdin.readline().split()))
n = I()
s = input()
(p, q) = (s.count('1'), s.count('0'))
if p == q:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
s = input()
if not s.count('1') == n / 2:
	print('1')
	print(s)
else:
	print('2')
	print(s[0] + ' ' + s[1:])


n = int(input())
s = input()
zc = 0
oc = 0
for char in s:
	if char == '0':
		zc += 1
	else:
		oc += 1
if zc != oc:
	print(1)
	print(s)
else:
	print(2)
	print(s[:len(s) - 1], s[-1])


k = int(input())
s = input()
if k % 2 == 1 or k // 2 != s.count('0'):
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


n = int(input())
s = str(input())
c1 = s.count('1')
if c1 != n - c1:
	print('1')
	print(s)
else:
	i = 1
	con = 0
	while i < n and con != 1:
		ss = s[0:i]
		ssu = s[i:n]
		if ss.count('1') != ss.count('0') and ssu.count('1') != ssu.count('0'):
			con = 1
			print('2')
			print(ss, ssu)
			break
		i += 1


def main():
	n = int(input())
	q = input()
	(a, b) = (0, 0)
	for i in q:
		if i == '0':
			a += 1
		else:
			b += 1
	if a != b or n == 1:
		print(1)
		print(q)
	else:
		print(2)
		print(q[0], q[1:])
main()


n = int(input())
s = input().strip()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	print(2)
	print(s[:-1], s[-1])


n = int(input())
m = input()

def check():
	tp0 = tp1 = 0
	for i in range(len(m)):
		if m[i] == '1':
			tp1 += 1
		else:
			tp0 += 1
	if tp1 != tp0:
		print('1 \n', m)
		exit()
check()
if n % 2 == 1:
	print(1)
	print(m)
else:
	print(2)
	if n // 2 % 2 == 0:
		print(m[0:n // 2 - 1], m[n // 2 - 1:n])
	else:
		print(m[0:n // 2], m[n // 2:n])


input()
s = input()
print(*([1, s] if s.count('1') != len(s) / 2 else [2, s[0] + ' ' + s[1:]]), sep='\n')


n = int(input())
s = input()
z1 = s.count('0')
z2 = s.count('1')
if z1 != z2:
	print(1)
	print(s)
else:
	print(2)
	print(s[0:n - 1], ' ', s[n - 1])


from math import ceil

def get_list_halved(lst):
	mid = ceil(len(lst) / 2)
	return (lst[:mid], lst[mid:])

def count_n(lst, n):
	return len(list(filter(lambda x: x == n, lst)))

def is_valid(lst):
	return count_n(lst, 0) != count_n(lst, 1)
input()
s = input()
ns = list(map(int, s))
if is_valid(ns):
	print(1)
	print(s)
else:
	print(2)
	(h1, h2) = get_list_halved(ns)
	first = ''.join(list(map(str, h1)))
	if is_valid(h1) and is_valid(h2):
		print(first + ' ' + ''.join(list(map(str, h2))))
	else:
		print(first + str(h2[0]) + ' ' + ''.join(list(map(str, h2[1:]))))


n = int(input())
s = input()
k = 0
f_s = ''

def GoodCh(st):
	if not st:
		return False
	else:
		one = 0
		zero = 0
		for i in st:
			if i == '1':
				one += 1
			elif i == '0':
				zero += 1
		if one == zero:
			return False
		else:
			return True
a = []
bs = ''
ans = []

def answer(st, arr, bst):
	for i in range(len(st)):
		if len(st) == 1:
			i = 1
		substr = st[0:i]
		if GoodCh(substr) == True:
			bst = substr
	st = st[len(substr):]
	arr.append(bst)
	bst = ''
	if not st:
		return arr
	else:
		return answer(st, arr, bst)
if GoodCh(s) == True:
	k = 1
	f_s = s
else:
	ans = answer(s, a, bs)
	k = len(ans)
	for l in ans:
		f_s += l + ' '
print(k)
print(f_s)


n = int(input())
s = input()
if n == 1:
	print(1)
	print(s)
elif n == 2:
	if s[0] != s[1]:
		print(2)
		print(s[0], s[1])
	else:
		print(1)
		print(s)
elif n % 2 != 0 or s.count('1') != s.count('0'):
	print(1)
	print(s)
elif n % 2 == 0:
	x = n // 2
	if x % 2 == 0:
		print(2)
		print(s[:x + 1], s[x + 1:])
	else:
		print(2)
		print(s[:x], s[x:])


n = int(input())
a = input()
p = list(a)
c1 = 0
c2 = 0
for i in p:
	if i == '1':
		c1 += 1
	else:
		c2 += 1
if c1 != c2:
	print('1')
	print(a)
else:
	print('2')
	temp = p[0]
	print('{} {}'.format(temp, a[1:]))


class cinn:

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

	def cin(self, t=int):
		if len(self.x) == 0:
			a = input()
			self.x = a.split()
			self.x.reverse()
		return self.get(t)

	def get(self, t):
		return t(self.x.pop())

	def clist(self, n, t=int):
		l = [0] * n
		for i in range(n):
			l[i] = self.cin(t)
		return l

	def clist2(self, n, t1=int, t2=int, t3=int, tn=2):
		l = [0] * n
		for i in range(n):
			if tn == 2:
				a1 = self.cin(t1)
				a2 = self.cin(t2)
				l[i] = (a1, a2)
			elif tn == 3:
				a1 = self.cin(t1)
				a2 = self.cin(t2)
				a3 = self.cin(t3)
				l[i] = (a1, a2, a3)
		return l

	def clist3(self, n, t1=int, t2=int, t3=int):
		return self.clist2(self, n, t1, t2, t3, 3)

	def cout(self, i, ans=''):
		if ans == '':
			print('Case #' + str(i + 1) + ':', end=' ')
		else:
			print('Case #' + str(i + 1) + ':', ans)

	def printf(self, thing):
		print(thing, end='')

	def countlist(self, l, s=0, e=None):
		if e == None:
			e = len(l)
		dic = {}
		for el in range(s, e):
			if l[el] not in dic:
				dic[l[el]] = 1
			else:
				dic[l[el]] += 1
		return dic

	def talk(self, x):
		print(x, flush=True)

	def dp1(self, k):
		L = [-1] * k
		return L

	def dp2(self, k, kk):
		L = [-1] * k
		for i in range(k):
			L[i] = [-1] * kk
		return L

	def isprime(self, n):
		if n == 1 or n == 0:
			return False
		for i in range(2, int(n ** 0.5 + 1)):
			if n % i == 0:
				return False
		return True

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

	def nthprime(self, n):
		i = 0
		s = 2
		L = []
		while i < n:
			while not self.isprime(s):
				s += 1
			L.append(s)
			s += 1
			i += 1
		return L

	def matrixin(self, m, n, t=int):
		L = []
		for i in range(m):
			p = self.clist(n, t)
			L.append(p)
		return L

	def seive(self, k):
		n = k + 1
		L = [True] * n
		L[1] = False
		L[0] = False
		for i in range(2, n):
			if L[i] == True:
				for j in range(2 * i, n, i):
					L[j] = False
		return L

	def seiven(self, n, L):
		i = 0
		for j in range(len(L)):
			if L[j] == True:
				i += 1
			if i == n:
				return j

	def matrixin2(self, m, t=int):
		L = []
		for i in range(m):
			iny = self.cin(str)
			lsmall = []
			for el in iny:
				lsmall.append(t(el))
			L.append(lsmall)
		return L
c = cinn()
n = c.cin()
s = list(c.cin(str))
co = c.countlist(s)
if '1' not in co:
	co['1'] = 0
if '0' not in co:
	co['0'] = 0
if co['1'] == co['0']:
	print(2)
	print(''.join(s[:-1]), s[n - 1])
else:
	print(1)
	print(''.join(s))


l = int(input())
string = input()
balance = 0
for i in range(l):
	if string[i] == '0':
		balance += 1
	else:
		balance -= 1
if balance == 0:
	print(f'2\n{string[0]} {string[1:]}')
else:
	print(f'1\n{string}')


n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
elif n % 2 == 0 and n // 2 % 2 != 0:
	print(2)
	print(s[0:n // 2] + ' ' + s[n // 2:])
elif n % 2 == 0:
	print(2)
	print(s[0:n // 2 + 1] + ' ' + s[n // 2 + 1:])


input()
s = input()
if s == '1':
	print(1, '\n', 1)
	exit()
if s.count('1') != s.count('0'):
	print(1, '\n', s)
	exit()
print(2, '\n', s[:len(s) - 1], ' ', s[-1], sep='')


a = int(input())
b = input()
zero = 0
one = 0
for i in b:
	if i == '0':
		zero += 1
	else:
		one += 1
if zero != one:
	print(1)
	print(b)
else:
	print(2)
	print(b[:1], b[1:])


n = int(input())
s = input()
ar = []
if n == 1:
	print(1)
	print(s)
else:
	while len(s) != 0:
		(z, o, max_index) = (0, 0, -1)
		for i in range(len(s)):
			if s[i] == '0':
				z += 1
			else:
				o += 1
			if z != o:
				max_index = i
		ar.append(s[0:max_index + 1])
		s = s[max_index + 1:]
	print(len(ar))
	print(*ar)


n = int(input())
s = input()
zero = s.count('0')
one = s.count('1')
if len(s) % 2 != 0 or zero != one:
	print('1')
	print(s)
else:
	print('2')
	print('{} {}'.format(s[0], s[1:]))


n = int(input())
s = input()
if s.count('1') == s.count('0'):
	A = s[:-1]
	B = s[-1]
	print(2)
	print(A, B)
else:
	print(1)
	print(s)


x = input()
y = input()
if len(y) % 2 != 0:
	print('1')
	print(y)
elif len(y) % 2 == 0 and len(y) != 2:
	if y.count('0') != y.count('1'):
		print('1')
		print(y)
	else:
		t = y[:len(y) // 2]
		s = y[len(y) // 2:]
		if t.count('0') != t.count('1') and s.count('0') != s.count('1'):
			print('2')
			print(t + ' ' + s)
		elif t.count('0') == t.count('1') and s.count('0') == s.count('1'):
			p = y[:len(y) // 2 + 1]
			q = y[len(y) // 2 + 1:]
			print('2')
			print(p + ' ' + q)
elif len(y) == 2:
	if y.count('0') != y.count('1'):
		print('1')
		print(y)
	else:
		print('2')
		a = y[0]
		b = y[1]
		print(a + ' ' + b)


n = int(input())
s = input()

def good(s, n):
	som = 0
	for i in range(n):
		if s[i] == '1':
			som += 1
		else:
			som -= 1
	return som != 0
if good(s, n):
	print(1)
	print(s)
else:
	print(2)
	print(s[:len(s) - 1], end=' ')
	print(s[len(s) - 1])


n = int(input())
s = input()
tl = len(s)
t1 = s.count('1')
t0 = tl - t1
if t1 != t0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
oc = s.count('1')
zc = n - oc
if oc == zc:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
c = 0
for i in range(n):
	if s[i] == '1':
		c += 1
one = n - c
if one != c:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[-1])


a = int(input())
b = input()
q = b.count('0')
w = b.count('1')
if q != w:
	print(1)
	print(b)
else:
	print(2)
	print(b[:len(b) - 1], b[-1])


def foo(p):
	a = p.count('0')
	b = p.count('1')
	if a == 0 or b == 0:
		return 1
	elif a != b:
		return 1
	else:
		return 0
n = int(input())
s = input()
if n == 1:
	print(1)
	print(s)
else:
	a = s.count('0')
	b = s.count('1')
	if a != b:
		print(1)
		print(s)
	else:
		for i in range(n - 1, -1, -1):
			x = s[:i]
			y = s[i:]
			if foo(x) == 1 and foo(y) == 1:
				print('2')
				print(x, y)
				quit(0)


import time
n = int(input())
s = input()
start = time.time()
n0 = 0
n1 = 0
for i in range(n):
	if s[i] == '0':
		n0 += 1
	else:
		n1 += 1
if n0 == n1:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)
finish = time.time()


n = int(input())
s = input()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	a = s[n - 1]
	b = list(s)
	b.pop()
	b = ''.join(b)
	c = ' '.join([b, a])
	print(2)
	print(c)


n = int(input())
l1 = input()
l = list(l1)
if l.count('0') == l.count('1'):
	print(2)
	p = l[-1]
	l[-1] = ' '
	l.append(p)
	print(''.join(l))
else:
	print(1)
	print(''.join(l))


int(input())
s = input()
ones_nr = s.count('1')
if len(s) - ones_nr != ones_nr:
	print(1)
	print(s)
	quit()
print(2)
print(s[0], s[1:])


from typing import List

class Solution:

	def matrix(self, s):
		if len(s) == 1:
			print('1\n' + s)
		else:
			one = 0
			cero = 0
			for i in s:
				if i == '1':
					one += 1
				else:
					cero += 1
			if cero == one:
				print(2)
				print(s[0] + ' ' + s[1:])
			else:
				print(1)
				print(s)
sol = Solution()
size = int(input())
s = input()
sol.matrix(s)


import math
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = input().strip()
k = l.count('1')
if n - k == k:
	print(2)
	print(l[0], l[1:])
else:
	print(1)
	print(l)


input()
s = input()

def good(s):
	return s.count('0') == s.count('1')
if not good(s):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


N = int(input())
s = input()
ones = 0
zeros = 0
for letter in s:
	if letter == '1':
		ones += 1
	else:
		zeros += 1
if ones != zeros:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:], sep=' ')


n = int(input())
s = input()
if n % 2 != 0:
	print(1)
	print(''.join(s))
else:
	num0 = 0
	for i in s:
		if i == '0':
			num0 += 1
	if num0 != n / 2:
		print(1)
		print(''.join(s))
	else:
		print(2)
		print(s[0], end=' ')
		print(s[1:])


def main():
	n = int(input())
	s = input()
	one = 0
	zero = 0
	for ch in s:
		if ch == '1':
			one += 1
		else:
			zero += 1
	if one != zero:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], end=' ')
		print(s[1:])
main()


n = int(input())
s = input()
o = sum((1 for c in s if c == '1'))
if o + o == n:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = str(input())
onecount = 0
for i in s:
	if i == '1':
		onecount += 1
if onecount * 2 == n:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
cnt_1 = 0
cnt_0 = 0
for i in range(n):
	if s[i] == '1':
		cnt_1 += 1
	elif s[i] == '0':
		cnt_0 += 1
if cnt_1 != cnt_0:
	print(1)
	print(s)
	exit()
else:
	for i in range(n):
		cnt_l1 = 0
		cnt_l0 = 0
		cnt_r1 = 0
		cnt_r0 = 0
		for j in range(n):
			if j < i:
				if s[j] == '1':
					cnt_l1 += 1
				else:
					cnt_l0 += 1
			elif s[j] == '1':
				cnt_r1 += 1
			else:
				cnt_r0 += 1
		if cnt_l1 != cnt_l0 and cnt_r1 != cnt_r0:
			print(2)
			print(s[0:j], s[j:])
			exit()


s = int(input())
st = input()

def isgood(stng):
	zero = 0
	one = 0
	for i in stng:
		if i == '0':
			zero = zero + 1
		else:
			one = one + 1
	if zero != one:
		return True
	else:
		return False
(str1, str2) = ('', '')
str1 = st
if isgood(str1):
	print(1)
	print(str1)
else:
	for k in range(0, s):
		if isgood(str1[:k]) and isgood(str1[k:]):
			print(2)
			print(str1[:k] + ' ' + str1[k:])
			break


t = int(input())
s = input()
if len(s) == 1:
	print(1)
	print(s)
elif s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	for i in range(t):
		if s[0:i].count('1') != s[0:1].count('0') and s[i:t].count('1') != s[i:t].count('0'):
			print(2)
			print(s[0:i], s[i:t])
			break


m = input()
n = input()
k_0 = 0
k_1 = 0
for i in n:
	if i == '0':
		k_0 += 1
k_1 = len(n) - k_0
if k_1 != k_0:
	print(1)
	print(n)
else:
	arr = []
	print(2)
	n = str(n)
	for i in n:
		arr.append(i)
	x = arr.pop()
	ans = ''
	for i in arr:
		ans += i
	print(ans, x)


input()
a = input()
print(('2\n' + a[0] + ' ' + a[1:] if len(a) > 1 else '1\n' + a) if a.count('1') == a.count('0') else '1\n' + a)


n = int(input())
s = input()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	str1 = s[0]
	str2 = s[1:]
	print(2)
	print(str1 + ' ' + str2)


x = int(input())
y = input()
if x == 1:
	print(1)
	print(y)
elif x % 2 == 0:
	ylist = list(y)
	sum0 = ylist.count('0')
	sum1 = ylist.count('1')
	if sum1 != sum0:
		print(1)
		print(y)
	elif x / 2 % 2 == 1:
		print(2)
		print(''.join(ylist[0:int(x / 2)]) + ' ' + ''.join(ylist[int(x / 2):x]))
	elif x / 2 % 2 == 0:
		print(2)
		print(''.join(ylist[0:int(x / 2) + 1]) + ' ' + ''.join(ylist[int(x / 2) + 1:x]))
elif x % 2 == 1:
	print(1)
	print(y)


k = int(input())
s = input()
num = s.count('1')
if num == k // 2 and k % 2 == 0:
	print(2)
	print(s[:k - 1], s[-1])
else:
	print(1)
	print(s)


x = int(input())
s = input()

def isGood(x):
	if len(x) % 2 == 1:
		return True
	t = 0
	for e in x:
		if e == '1':
			t += 1
	if t == len(x) // 2:
		return False
	else:
		return True
if isGood(s):
	print(1, s, sep='\n')
else:
	print(2)
	print(s[0], s[1:], sep=' ')


n = int(input())
s = input()
o = 0
z = 0
for i in range(n):
	if s[i] == '1':
		o += 1
	else:
		z += 1
if not o == z:
	print(1)
	print(s)
else:
	print(2)
	for j in range(n - 1):
		print(s[j], end='')
	print(end=' ')
	print(s[n - 1])


n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
	exit()
for i in range(n):
	if s[:i].count('1') != s[:i].count('0') and s[i:].count('1') != s[i:].count('0'):
		print(2)
		print(s[:i], s[i:])
		break


n = int(input())
a = input()
z = a.count('0')
o = n - z
if o != z:
	print(1)
	print(a)
else:
	print(2)
	print(a[:1] + ' ' + a[1:])


n = int(input())
s = input()
a = s.count('0')
c = s.count('1')
if a != c:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
m = input()
if m.count('1') != m.count('0'):
	print(1)
	print(m)
else:
	print(2)
	print(m[:n - 1], m[n - 1])


def good(s):
	n = len(s)
	if n % 2:
		return 1
	elif s.count('1') == n // 2 and s.count('0') == n // 2:
		return 0
	else:
		return 1
n = int(input())
s = list(input())
if n % 2:
	print('1')
	print(*s, sep='')
elif not (s.count('1') == n // 2 and s.count('0') == n // 2):
	print('1')
	print(*s, sep='')
else:
	i = 1
	while True:
		if good(s[:i]) and good(s[i:]):
			ans = i
			break
		else:
			i += 1
	print('2')
	print(*s[:ans], sep='', end=' ')
	print(*s[ans:], sep='')


t = input()
t = input()
a = t.count('0')
b = t.count('1')
if a != b:
	print(1)
	print(t)
else:
	print(2)
	print(t[0], t[1:])


n = int(input())
s = input()
if n == 1:
	print('1')
	print(s)
else:
	(z, o) = (0, 0)
	for i in range(n):
		if s[i] == '0':
			z += 1
		else:
			o += 1
	s1 = ''
	s2 = ''
	if o != z:
		print('1')
		print(s)
	else:
		for i in range(n):
			if o != z:
				s2 = s[i:n]
				print('2')
				print(s1, s2)
				break
			else:
				s1 += s[i]
				if s[i] == '0':
					z -= 1
				else:
					o -= 1


n = input()
s = input()
o = s.count('0')
z = s.count('1')
if o == z:
	print('2\n{} {}'.format(s[:-1], s[-1]))
else:
	print('1\n{}'.format(s))


n = int(input())
s = input()
print(('1 ' + s, '2 ' + s[0] + ' ' + s[1:])[s.count('0') * 2 == n])


l = int(input())
s = input()
zeros = s.count('0')
ones = l - zeros
if zeros != ones:
	print(1)
	print(s)
else:
	print(2)
	print(s[0:1] + ' ' + s[1:])


n = int(input())
a = input()
(c, d) = (0, 0)
for i in range(n):
	if a[i] == '1':
		c = c + 1
	else:
		d = d + 1
if c == d:
	print('2')
	print(a[0], end=' ')
	print(a[1:n])
else:
	print('1')
	print(a)


n = int(input())
s = input()
a = s.count('1')
b = s.count('0')
if a != b:
	print(1)
	print(s)
else:
	print(2)
	if len(s) == 2:
		print(s[0], s[1])
	elif len(s) == 3:
		print(s[0], s[1:])
	else:
		print(s[:3], s[3:])


n = int(input())
m = str(input())
a = m.count('0')
b = m.count('1')
if a != b:
	print(1)
	print(m)
else:
	c = 0
	d = 0
	fs = ''
	for i in range(0, len(m)):
		fs = fs + m[i]
		if m[i] == '1':
			c = c + 1
		else:
			d = d + 1
		if c != d:
			print(2)
			print(fs, m[i + 1:])
			break


n = int(input())
Z = 0
O = 0
s = input().rstrip()
x = list(s)
l = []
q = []
w = []
for i in range(0, len(x)):
	if x[i] == '1':
		O += 1
	else:
		Z += 1
if O != Z or len(x) == 1 or (len(x) == 2 and x[0] == x[1]):
	print(1)
	print(s)
elif len(x) == 2:
	print(2)
	print(x[0], x[1])
else:
	Z = 0
	O = 0
	G = 0
	for i in range(0, len(x)):
		for j in range(i, len(x)):
			t = x[i:j + 1]
			if t.count('0') != t.count('1'):
				g = x[j + 1:len(x)]
				if g.count('0') != g.count('1'):
					l.append(''.join(t))
					l.append(''.join(g))
					G = 1
					break
		if G == 1:
			break
	print(2)
	print(l[0], l[1])


n = int(input())
k0 = 0
k1 = 0
s = input()
for x in s:
	if x == '0':
		k0 += 1
	else:
		k1 += 1
if k0 != k1:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
dict = dict()
dict['1'] = 0
dict['0'] = 0
for letter in s:
	dict[letter] = dict.get(letter, 0) + 1
if dict['0'] != dict['1']:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


n = int(input())
l = input()
b = 0
for i in l:
	if i == '0':
		b += 1
	else:
		b -= 1
if b != 0:
	print('1' + '\n' + l)
else:
	print('2' + '\n' + l[0:-1] + ' ' + l[-1])


n = int(input())
s = input()
if n == 1:
	print(1)
	print(s)
	exit()
one = 0
zero = 0
for i in range(n):
	if s[i] == '0':
		zero += 1
	else:
		one += 1
if one == zero:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


x = int(input())
s = input()
one = 0
zero = 0
for i in range(len(s)):
	if s[i] == '0':
		zero += 1
	else:
		one += 1
if one != zero:
	print(1)
	print(s)
else:
	print('2')
	print(s[0], '', s[1:])


def check(s):
	(on, off) = (0, 0)
	for i in range(len(s)):
		if s[i] == '1':
			on += 1
		else:
			off += 1
	return not on == off
n = int(input())
s = input()
if not check(s):
	print(2)
	print(s[:1], s[1:])
else:
	print(1)
	print(s)


import os
import sys
from io import BytesIO, IOBase

def main():
	n = int(input())
	s = input()
	if s.count('1') != s.count('0'):
		print(1)
		print(s)
	else:
		for x in range(1, n):
			if s[x:].count('1') != s[x:].count('0') and s[:x].count('1') != s[:x].count('0'):
				print(2)
				print(s[:x], s[x:])
				break
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def answer():
	a = int(input())
	c = input()
	b = list(c)
	(o, z) = (0, 0)
	for x in b:
		if x == '0':
			z += 1
		else:
			o += 1
	if o != z:
		print(1)
		print(c)
	else:
		print(2)
		print(c[0], c[1:])
answer()


n = int(input().strip())
s = input()
n1 = n0 = 0
for i in s:
	if i == '0':
		n0 += 1
	else:
		n1 += 1
if n0 != n1:
	print(1)
	print(s)
elif n != 2:
	ans1 = s[0]
	ans2 = s[1:]
	print(2)
	print(ans1, ans2)
else:
	ans1 = s[0]
	ans2 = s[1]
	print(2)
	print(ans1, ans2)


def main():
	n = int(input())
	s = input()
	s_list = list(s)
	n_ones = sum([1 for c in s_list if c == '1'])
	if n_ones * 2 != n:
		print(1)
		print(s)
		return
	print(2)
	print('%s %s' % (s[0], s[1:]))
main()


n = int(input())
a = input()
ct = 0
for x in a:
	if x == '1':
		ct += 1
if n & 1 or n != 2 * ct:
	print(1)
	for i in range(n):
		print(a[i], end='')
else:
	print(2)
	print(a[0], end=' ')
	for i in range(1, n):
		print(a[i], end='')


n = int(input())
str = input()
z = o = 0
for x in range(0, n):
	if str[x] == '1':
		o += 1
	else:
		z += 1
if z == o:
	print(2)
	print(str[0], str[1:])
else:
	print(1)
	print(str)


import sys, math

def read_int():
	return int(sys.stdin.readline().strip())

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

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

def read_string_list(delim=' '):
	return sys.stdin.readline().strip().split(delim)

def print_list(l, delim=' '):
	print(delim.join(map(str, l)))
n = read_int()
s = read_string()
counts = {'0': 0, '1': 0}
for _s in s:
	counts[_s] += 1
if counts['0'] != counts['1']:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
ed = 0
nul = 0
for i in s:
	if i == '1':
		ed += 1
	else:
		nul += 1
if ed == nul:
	print(2)
	print(s[0] + ' ' + s[1:])
else:
	print(1)
	print(s)


import sys
N = int(sys.stdin.readline())
a = sys.stdin.readline()[:-1]
c0 = a.count('0')
c1 = a.count('1')
if c0 != c1:
	print(1)
	print(str(a))
else:
	print(2)
	print(str(a[0]), a[1:])


l = int(input())
line = input()
if list(line).count('1') != list(line).count('0'):
	print('1\n' + line)
elif list(line[0:l // 2]).count('1') != list(line[0:l // 2]).count('0'):
	print('2\n' + line[0:l // 2] + ' ' + line[l // 2:l])
else:
	print('2\n' + line[0:l // 2 + 1] + ' ' + line[l // 2 + 1:l])


n = int(input())
s = list(input())
if n == 1:
	print('1')
	l = ''.join(map(str, s))
	print(l)
elif s.count('1') != s.count('0'):
	print('1')
	l = ''.join(map(str, s))
	print(l)
else:
	s1 = ''
	s2 = ''
	for i in range(0, n - 1):
		s1 = s1 + s[i]
	for i in range(n - 1, n):
		s2 += s[i]
	print('2')
	print(s1, s2)


a = int(input())
b = input()
if b.count('1') == b.count('0'):
	print(2)
	for i in range(len(b) - 1):
		print(b[i], end='')
	print('', b[-1])
else:
	print(1)
	print(b)


def find(val):
	one = val.count('1')
	two = val.count('0')
	if one == two:
		return (2, '{} {}'.format(val[0:len(val) - 1], val[-1]))
	else:
		return (1, val)
y = int(input())
x = find(input())
print(x[0])
print(x[1])


n = int(input())
s = input()
n1 = 0
n0 = 0
if len(s) % 2 != 0:
	print('1', s)
else:
	for i in s:
		if int(i) == 1:
			n1 = n1 + 1
		elif int(i) == 0:
			n0 = n0 + 1
	if n1 != n0:
		print('1', s)
	else:
		new = s[0:1]
		print('2', new, s[1:len(s)])


n = int(input())
s = input()
k = 0
for i in range(n):
	if s[i] == '0':
		k += 1
p = n - k
if p != k:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[-1])


n = int(input())
s = list(input())
a0 = s.count('0')
a1 = s.count('1')
if a0 == 0:
	a0 = -1
if a1 == 0:
	a1 = -1
(b0, b1) = (0, 0)
for i in range(n):
	if a0 != a1:
		print(1)
		print(''.join(s))
		break
	if s[i] == '0':
		b0 += 1
	else:
		b1 += 1
	if b1 != b0 and a0 - b0 != a1 - b1:
		L1 = ''.join(s[:i + 1])
		L2 = ''.join(s[i + 1:])
		if len(L2) == 0:
			print(1)
			print(L1)
			break
		elif len(L1) == 0:
			print(1)
			print(L2)
			break
		else:
			print(2)
			print(L1, end=' ')
			print(L2)
			break


def KeanuMahBoiReeves(string):
	total = sum([1 if char == '1' else -1 for char in string])
	if total != 0:
		return [string]
	return [string[:-1], string[-1]]
n = int(input())
s = input()
results = KeanuMahBoiReeves(s)
print(len(results))
print(' '.join(results))


n = int(input())
s = input()
zeros = 0
for a in s:
	if a == '0':
		zeros += 1
if n - zeros == zeros:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


mod = 10 ** 9 + 7
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq
from random import randint as rn

def prin(lst):
	print(''.join(lst))

def modinv(n, p):
	return pow(n, p - 2, p)

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

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	t = inin()
	s = sin()
	x = 0
	for i in s:
		if i == '0':
			x += 1
	if x == t - x:
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


n = input()
s = input()
n = int(n)
c = 0
for ch in s:
	if ch == '0':
		c += 1
if c == n - c:
	print(2)
	print(s[0], end=' ')
	print(s[1:])
else:
	print(1)
	print(s)


k = int(input())
S = str(input())
s = list(S)
zero = s.count('0')
one = s.count('1')
if zero != one:
	print(1)
	print(S)
else:
	print(2)
	print(S[0], S[1:])


def good(s):
	return s.count('1') != s.count('0')
n = int(input())
s = input()
if good(s):
	print(1)
	print(s)
else:
	for i in range(1, len(s)):
		curr_s = s[0:i]
		next_s = s[i:]
		if good(curr_s) and good(next_s):
			print(2)
			print(curr_s, next_s)
			break


n = int(input())
s = input()
c = c0 = c1 = c2 = c3 = c4 = 0
for k in s:
	if k == '0':
		c += 1
	else:
		c0 += 1
if c != c0:
	print('1')
	print(s)
else:
	for i in range(n):
		s1 = s[:i + 1]
		s2 = s[i + 1:]
		for j in s1:
			if j == '0':
				c1 += 1
			else:
				c2 += 1
		for j in s2:
			if j == '0':
				c3 += 1
			else:
				c4 += 1
		if c1 != c2 and c3 != c4:
			print(2)
			print(s1, s2)
			break


n = int(input())
s = input()
k = 0
a = 0
b = 0
for i in s:
	if i == '0':
		a += 1
	if i == '1':
		b += 1
if a == b:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
a = input().strip()
if n % 2 == 1:
	print(1)
	print(a)
elif a.count('1') * 2 == n:
	print(2)
	print(a[0], a[1:])
else:
	print(1)
	print(a)


n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print('1')
	print(s)
else:
	k = 1
	for i in range(n):
		k = k + 1
		s1 = s[0:i + 1]
		s2 = s[i + 1:]
		if s1.count('1') != s1.count('0') and s2.count('1') != s2.count('0'):
			print(k)
			print(''.join(s1), ''.join(s2))
			break


n = input()
mat = input()
count1 = 0
count0 = 0
for i in range(len(mat)):
	if mat[i] == '1':
		count1 = count1 + 1
	elif mat[i] == '0':
		count0 = count0 + 1
if count1 != count0:
	print('1')
	print(mat)
else:
	print('2')
	if mat[len(mat) - 1] == '0':
		new = mat[::-1].replace('0'[::-1], ''[::-1], 1)[::-1]
		print(new, '0')
	elif mat[len(mat) - 1] == '1':
		new = mat[::-1].replace('1'[::-1], ''[::-1], 1)[::-1]
		print(new, '1')


s_len = int(input())
abc = input()
num_0 = 0
for i in range(s_len):
	if abc[i] == '0':
		num_0 += 1
num_1 = 0
for i in range(s_len):
	if abc[i] == '1':
		num_1 += 1
if num_0 == num_1:
	print(2)
	print(abc[0], abc[1:])
else:
	print(1)
	print(abc)


n = int(input())
s = input()
if n % 2 == 1:
	print(f'1\n{s}')
elif s.count('0') != s.count('1'):
	print(f'1\n{s}')
else:
	print(f'2\n{s[:1]} {s[1:]}')


N = int(input())
L = input()
Lbis = list(L)
if len(Lbis) % 2 == 1:
	print(1)
	print(L)
	exit()
count = 0
for i in Lbis:
	if i is '1':
		count += 1
	else:
		count -= 1
if count != 0:
	print(1)
	print(L)
else:
	print(2)
	print(L[0] + ' ' + L[1:])


n = int(input())
s = input()
t = [int(x) for x in s]
if 2 * sum(t) == len(t):
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


a = int(input())
b = input()
c = 0
d = 0
for i in range(a):
	if b[i] == '1':
		c = c + 1
	else:
		d = d + 1
if c != d:
	print(1)
	print(b)
else:
	print(2)
	print(b[0], b[1:])


n = input()
s = input()
ceros = 0
ones = 0
for c in s:
	if c == '0':
		ceros += 1
	else:
		ones += 1
if ceros != ones:
	print(1)
	print(s)
else:
	print(2)
	print(s[0:len(s) - 1] + ' ' + s[len(s) - 1])


a = input()
b = input()
zero = b.count('0')
one = b.count('1')
if zero != one:
	print(1)
	print(b)
else:
	print(2)
	print(b[0], b[1:])


n = int(input())
p = input()
if p.count('1') != p.count('0'):
	print('1')
	print(p)
else:
	print('2')
	print(p[0] + ' ' + p[1:])


n = int(input())
s = input()
if n % 2 == 0:
	if s.count('0') == s.count('1'):
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)
elif n == 1:
	print(1)
	print(s)
elif s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	for i in range(1, n):
		s1 = s[:i]
		s2 = s[i:]
		if s1.count('1') != s1.count('0') and s2.count('1') != s2.count('0'):
			print(2)
			print(s1, s2)
			break


n = int(input())
s = input()
for i in range(len(s)):
	zero = s.count('0')
	one = s.count('1')
if zero == one:
	print(2)
	print(s[0], end=' ')
	print(s[1:len(s)])
else:
	print(1)
	print(s)


n = input()
s = input()
rev_dict = {'0': '1', '1': '0'}

def find_split(bin_str):
	start = bin_str[0]
	rem = bin_str[1:]
	pos = rem.find(rev_dict[start]) + 1
	return int(pos)

def split(bin_str, pos):
	ln = len(bin_str)
	s1 = bin_str[:pos]
	s2 = bin_str[pos:]
	return (s1, s2)

def get_num_digs(bin_str):
	zeros = bin_str.count('0')
	ones = bin_str.count('1')
	return (zeros, ones)

def test_diff(bin_str):
	if bin_str.count('0') != bin_str.count('1'):
		return True
	else:
		return False

def test_done(parts, bin_str):
	if ''.join(parts) == bin_str:
		return True

def pre_check(bin_str):
	if bin_str.count('0') != bin_str.count('1'):
		print(f'1\n{bin_str}')
		return True
	else:
		return False

def finalize(parts):
	num = len(parts)
	print(num)
	print(*parts)

def main(bin_str):
	if pre_check(bin_str):
		return
	good_parts = []
	while True:
		pos = find_split(bin_str)
		(s1, s2) = split(bin_str, pos)
		good_parts.append(s1)
		bin_str = s2
		if test_diff(s2):
			good_parts.append(s2)
			finalize(good_parts)
			break
main(s)


input()
s = input()
one = s.count('1')
zero = s.count('0')
if one == zero:
	print('2')
	print(s[:-1] + ' ' + s[-1])
else:
	print('1')
	print(s)


import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline()[:-1]
zeros = 0
ones = 0
for i in s:
	if i == '0':
		zeros += 1
	else:
		ones += 1
if ones != zeros:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


n = input()
s = input()
a = b = 0
for c in s:
	if c == '1':
		a += 1
	else:
		b += 1
if a != b:
	print(1)
	print(s)
else:
	print(2)
	print('{} {}'.format(s[:-1], s[-1]))


import math
import sys
import collections

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

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

def li():
	return list(map(int, input().split()))
n = ii()
s = input()
t = s.count('0')
o = s.count('1')
if n % 2 == 1 or t != o:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


def isgood(s):
	c = s.count('0')
	if c != len(s) - c:
		return True
	return False
n = int(input())
k = input()
if isgood(k):
	print(1)
	print(k)
else:
	for i in range(1, n):
		k1 = k[:i]
		k2 = k[i:]
		if isgood(k1) and isgood(k2):
			print(2)
			print(k1, k2)
			break


n = int(input())
s = input().rstrip('\n')
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = input()
s = input()
p = 0
q = 0
for i in range(0, len(s)):
	if s[i] == '1':
		p = p + 1
	else:
		q = q + 1
if p != q:
	print('1')
	print(s)
else:
	print(2)
	print(s[0])
	t = ''
	for i in range(1, len(s)):
		t = t + s[i]
	print(t)


n = int(input())
s = input()
cs = sum([int(i) for i in s])
if cs * 2 == n:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
s = input()
weight = 0
start = 0
for i in s:
	if i == '1':
		weight += 1
	else:
		weight -= 1
if weight != 0:
	print(1, s, sep='\n')
else:
	print(2, s[:-1] + ' ' + s[-1:], sep='\n')


n = int(input())
s = input()

def good_or_bad(value: str):
	count = 0
	for c in value:
		if c == '1':
			count += 1
		else:
			count -= 1
	if count == 0:
		return False
	else:
		return True
if good_or_bad(s):
	print(f'{1}\n{s}')
else:
	print(f'{2}\n{s[:-1]} {s[-1]}')


n = int(input())
s = input()
i = 1
if n == 1:
	print(1)
	print(s)
	exit(0)
if s.count('1') != s.count('0'):
	print(1)
	print(s)
	exit(0)
while s[i:].count('1') == s[i:].count('0') or s[:i].count('1') == s[:i].count('0'):
	i += 1
print(2)
print(s[:i] + ' ' + s[i:])


n = int(input())
s = input()
count = 0
count0 = s.count('0')
count1 = s.count('1')
if count0 == count1:
	print('2')
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
s = input()
ones = sum((1 for x in s if x == '1'))
zeros = sum((1 for x in s if x == '0'))
if n % 2 or ones != zeros:
	print(1)
	print(s)
	exit(0)
print(2)
print(s[0], s[1:])


def main():
	n = int(input())
	s = input()
	ans = 0
	d = {'0': -1, '1': 1}
	for i in range(n):
		ans += d[s[i]]
	if ans:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], s[1:])
main()


n = int(input())
array = input()
one = 0
zero = 0
for i in array:
	if i == '0':
		zero += 1
	else:
		one += 1
if one != zero:
	print(1)
	print(array)
else:
	print(2)
	print(array[0], array[1:])


from collections import Counter
N = int(input())
S = input().strip()
SC = Counter(S)
if SC['1'] != SC['0']:
	print(1)
	print(S)
else:
	print(2)
	print(S[:-1], S[-1])


input()
a = input()
print(1, a, sep='\n') if a.count('1') != a.count('0') else print(2, a[0] + ' ' + a[1:], sep='\n')


n = int(input())
s = list(input())
cou = [[0] * n for i in range(2)]
if s[0] == '0':
	cou[0][0] = 1
	cou[1][0] = 0
else:
	cou[0][0] = 0
	cou[1][0] = 1
for i in range(1, n):
	if s[i] == '0':
		cou[0][i] = cou[0][i - 1] + 1
		cou[1][i] = cou[1][i - 1]
	else:
		cou[0][i] = cou[0][i - 1]
		cou[1][i] = cou[1][i - 1] + 1
if n == 1:
	print(1)
	print(*s)
	exit()
if cou[0][-1] != cou[1][-1]:
	print('1')
	print(*s, sep='')
	exit()
for i in range(n):
	a = cou[0][i]
	b = cou[1][i]
	if a != b and cou[0][-1] - a != cou[1][-1] - b:
		print('2')
		print(*s[:i + 1], sep='', end=' ')
		print(*s[i + 1:], sep='')
		exit()
print('3')
print(s[0], ' ', s[1], ' ', *s[2:], sep='')


a = int(input())
s = input()
if s.count('1') == s.count('0'):
	print(2)
	print(s[0:len(s) - 1], s[-1])
else:
	print(1)
	print(s)


from sys import stdin, stdout

def rsingle_int():
	return int(stdin.readline().rstrip())

def rmult_int():
	return [int(x) for x in stdin.readline().rstrip().split()]

def r_str():
	return stdin.readline().rstrip()

def rsingle_char():
	return stdin.read(1)

def main():
	N = rsingle_int()
	chars = []
	n_ones = 0
	n_zeros = 0
	s = r_str()
	for i in range(N):
		c = s[i]
		if c == '1':
			n_ones += 1
		else:
			n_zeros += 1
	if n_ones != n_zeros:
		print(1)
		print(s)
	else:
		print(2)
		print(s[:N - 1] + ' ' + s[N - 1])
main()


n = int(input())
s = input()
a = int(0)
b = int(0)
c = int(1)
for i in range(len(s)):
	if s[i] == '1':
		a += 1
	else:
		b += 1
if a != b:
	print(1)
	print(s)
	exit()
else:
	print(2)
	print(s[0] + ' ' + s[1:])


t = int(input())
s = input()
if s.count('0') != s.count('1'):
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
q1 = []
q0 = []
if s[0] == '1':
	q1.append(1)
	q0.append(0)
else:
	q1.append(0)
	q0.append(1)
for i in range(1, n):
	if s[i] == '1':
		q1.append(q1[i - 1] + 1)
		q0.append(q0[i - 1])
	else:
		q1.append(q1[i - 1])
		q0.append(q0[i - 1] + 1)
if q1[-1] != q0[-1]:
	print(1)
	print(s)
	exit(0)
for i in range(n):
	if q1[i] != q0[i]:
		if q1[n - 1] - q1[i] != q0[n - 1] - q0[i]:
			print(2)
			print(s[:i + 1], s[i + 1:])
			break


n = int(input())
s = input()
k = ''
if s.count('0') != s.count('1'):
	print(1)
	print(s)
elif len(s) >= 3:
	i = 2
	k += s[0]
	k += s[1]
	while i < len(s):
		a0 = k.count('0')
		a1 = k.count('1')
		if a0 != a1:
			break
		else:
			k += s[i]
		i = i + 1
	k1 = ''
	l = len(k)
	i = l
	while i < len(s):
		k1 += s[i]
		i = i + 1
	print(2)
	print(k, k1)
else:
	print(2)
	print(s[0], s[1])


n = int(input())
s = input()

def isGood(st):
	return st.count('0') != st.count('1')
if isGood(s):
	print(1)
	print(s)
else:
	print(2)
	print(s[:-1], s[-1])


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = iinp()
s = inp()
c1 = s.count('0')
c2 = s.count('1')
if c1 != c2:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
a = list(map(int, list(s)))
if sum(a) * 2 == n:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


n = int(input())
st = input()
if st.count('0') == st.count('1'):
	print(2)
	print(st[:n - 1], st[n - 1])
else:
	print(1)
	print(st)


l = int(input())
s = input()
sum = 0
for i in s:
	sum = sum + int(i)
if sum == l / 2:
	s_1 = s[0]
	s_2 = s[1:]
	print('2')
	print(s_1, s_2)
else:
	a = 1
	print(a)
	print(s)


n = int(input())
user = str(input())
data = {0: 0, 1: 0}
for i in user:
	if i == '0':
		data[0] += 1
	elif i == '1':
		data[1] += 1
if data[0] != data[1]:
	print(1)
	print(user)
	exit()
else:
	print(2)
	print(user[0], end=' ')
	print(user[1:])


n = int(input())
s = input()
if s.count('0') != s.count('1'):
	print(1, s, sep='\n')
else:
	for i in range(1, n):
		if s[:i].count('0') != s[:i].count('1') and s[i:].count('0') != s[i:].count('1'):
			print(2)
			print(s[:i], s[i:])
			break


a = int(input())
bi = input()
i = 0
zero = 0
um = 0
trans = 1
comp = ['', '']
while i < a:
	if bi[i] == '1':
		um += 1
	else:
		zero += 1
	i += 1
if zero != um:
	print(trans)
	print(bi)
else:
	zero = 0
	um = 0
	if a % 2 == 0 and a / 2 % 2 != 0:
		x = 0
		trans += 1
		while x < a / 2:
			comp[0] += bi[x]
			comp[1] += bi[int(x + a / 2)]
			x += 1
	elif a / 2 % 2 == 0:
		x = 0
		trans += 1
		while x < a / 2 - 1:
			comp[0] += bi[x]
			x += 1
		x = 0
		while x < a / 2 + 1:
			comp[1] += bi[int(x + a / 2 - 1)]
			x += 1
	print(trans)
	print(*comp)


print((lambda x, s: (f'1\n{s}', f'2\n{s[0]} {s[1:]}')[s.count('1') * 2 == x])(int(input()), input()))


s_len = input()
str = input()
if s_len == 1:
	print(str)
	exit()
ones_count = str.count('1')
zero_count = str.count('0')
if ones_count != zero_count:
	print(1)
	print(str)
else:
	print(2)
	print(str[0], end=' ')
	print(str[1:])


n = int(input())
s = input()
count = 0
for i in range(n):
	if s[i] == '1':
		count += 1
if count != n / 2:
	print(1)
	print(s)
else:
	print(2)
	ans = str(s[:n - 1]) + ' ' + str(s[-1])
	print(ans)


n = int(input())
s = str(input())
bal = 0
for c in s:
	if c == '0':
		bal += 1
	else:
		bal -= 1
if bal != 0:
	print('1' + '\n' + s)
else:
	print('2' + '\n' + s[0:-1] + ' ' + s[-1])


n = int(input())
s = input()
L = [i for i in s]
if L.count('1') != L.count('0'):
	print(1)
	print(s)
else:
	print(2)
	print(''.join(L[:n - 1]), ''.join(L[-1:]))


n = int(input())
s = input()
cnt = 0
for ch in s:
	if ch == '0':
		cnt = cnt + 1
	else:
		cnt = cnt - 1
if cnt != 0:
	print('1' + '\n' + s[0:])
else:
	print('2' + '\n' + s[0:-1] + ' ' + s[-1])


n = int(input())
s = input()
i = 0
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	while s[0:i + 1].count('0') == s[0:i + 1].count('1') or (s[i + 1:].count('0') == s[i + 1:].count('1') and i < n):
		i += 1
	if i == n:
		print(1)
		print(s)
	else:
		print(2)
		print(s[:i + 1] + ' ' + s[i + 1:])


import sys
n = int(sys.stdin.readline().strip())
s = sys.stdin.readline().strip()
x = 0
for i in range(0, n):
	if s[i] == '1':
		x = x + 1
if 2 * x != n:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


import re, math, decimal, bisect

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

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

def viread():
	return [int(_) for _ in input().strip().split()]
n = iread()
s = read()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[n - 1])


def main():
	n = int(input())
	s = input()
	if len(s) == 1:
		print(1)
		print(s)
		return
	else:
		zero = 0
		one = 0
		for i in s:
			if i == '0':
				zero += 1
			elif i == '1':
				one += 1
		if zero == one:
			print(2)
			start = s[0]
			if len(s) == 2:
				print(s[0] + ' ' + s[1])
				return
			else:
				for j in range(1, len(s)):
					if s[j] != start:
						print(s[:j] + ' ' + s[j:])
						return
		elif zero != one:
			print(1)
			print(s)
			return
main()


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_strList_from_str = lambda : list(sys.stdin.readline().strip())
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
lst = get_list()
s = get_string()
if s.count('1') == s.count('0'):
	a = s[:-1]
	b = s[-1:]
	print(2)
	print(a, b)
else:
	print(1)
	print(s)


from sys import stdin
import math
n = int(stdin.readline())
s = stdin.readline()
nz = 0
no = 0
for i in range(n):
	if s[i] == '0':
		nz += 1
	else:
		no += 1
if nz != no:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
stream = list(input())
info = list()
val = 0
index = 0
for x in stream:
	if index == 0:
		if x == '0':
			info.append(1)
		else:
			info.append(-1)
	elif x == '0':
		info.append(info[index - 1] + 1)
	else:
		info.append(info[index - 1] - 1)
	index = index + 1
ans = dict()
if info[n - 1] != 0:
	ans['val'] = 1
	ans['str'] = stream
else:
	ans['val'] = 2
	ans['str'] = stream[0:n - 1] + [' '] + stream[n - 1:n]
print(ans['val'])
print(''.join(ans['str']))


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 1000000007
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
n = Int()
s = input()
one = s.count('1')
zero = s.count('0')
if one != zero:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
(zero, ones) = (0, 0)
for i in s:
	if i == '0':
		zero += 1
	else:
		ones += 1
A = []
for i in s:
	A.append(i)
n = len(s)
if zero == ones:
	print(2)
	print(''.join(A[:n - 1]), A[-1])
else:
	print(1)
	print(s)


len = int(input())
ss = input()
zero = one = 0
for n in ss:
	if n == '1':
		one += 1
	else:
		zero += 1
if one == zero:
	print(2)
	print(ss[0:len - 1], ' ', ss[len - 1:len])
else:
	print(1)
	print(ss)


n = int(input())
s = list(input())
if n % 2 == 1:
	print('1')
	print(''.join(s))
else:
	cnt_1 = s.count('1')
	cnt_0 = s.count('0')
	if cnt_0 == cnt_1:
		l = s[0:n // 2]
		if l.count('1') == l.count('0'):
			print('2')
			l1 = s[0:n // 2 + 1]
			l2 = s[n // 2 + 1:n]
			print(''.join(l1) + ' ' + ''.join(l2))
		else:
			print('2')
			l1 = s[0:n // 2]
			l2 = s[n // 2:n]
			print(''.join(l1) + ' ' + ''.join(l2))
	else:
		print('1')
		print(''.join(s))


n = int(input())
s = input()
o = 0
z = 0
for x in s:
	if x == '0':
		z += 1
	else:
		o += 1
if o != z:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


def rahul(word):
	return [char for char in word]
a = int(input())
z = input()
b = rahul(z)
r = 0
while True:
	if b.count('1') != b.count('0'):
		print(1)
		print(z)
		break
	else:
		c = b[:r + 1]
		d = b[r + 1:]
		if d.count('1') != d.count('0') and c.count('1') != c.count('0'):
			print(2)
			print(''.join((char for char in c)), end=' ')
			print(''.join((char for char in d)))
			break
	r = r + 1


n = int(input())
a = list(input())
s = a.count('1')
t = a.count('0')
b = a.copy()
b.remove(a[0])
if s == t:
	print(2)
	print(int(a[0]), ''.join(b))
else:
	print(1)
	print(''.join(a))


n = int(input())
s = input()
p = s.count('1')
q = s.count('0')
if p != q:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


input()
a = input()
last = prev_last = 0
count0 = 0
count1 = 0
res = []
while last != len(a):
	for i in range(last, len(a)):
		if a[i] == '0':
			count0 += 1
		if a[i] == '1':
			count1 += 1
		if count0 != count1:
			last = i + 1
	res.append(a[prev_last:last])
	prev_last = last
if prev_last != last:
	res.append(a[prev_last:])
print(len(res), '\n', ' '.join(res), sep='')


def isEven(s):
	zeroCount = 0
	for char in s:
		if char == '0':
			zeroCount += 1
		else:
			zeroCount -= 1
	return zeroCount == 0

def evenStrings(s):
	if len(s) % 2 != 0 or not isEven(s):
		return [s]
	if len(s) // 2 % 2 != 0:
		return [s[:len(s) // 2], s[len(s) // 2:]]
	else:
		return [s[:len(s) // 2 - 1], s[len(s) // 2 - 1:]]
n = int(input())
s = input()
result = evenStrings(s)
print(len(result))
print(' '.join(list(map(str, result))))


from math import ceil
a = input()
b = input()
if b.count('0') != b.count('1'):
	print('1')
	print(b)
else:
	print('2')
	print(b[0], ' ', b[1:])


input()
s = input()
n_ones = sum(map(lambda c: c == '1', s))
n_zeros = len(s) - n_ones
if n_ones != n_zeros:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
if s.count('0') != s.count('1'):
	print('1\n{}'.format(s))
else:
	parts = []
	while s:
		for i in range(n, 0, -1):
			new_s = s[0:i]
			if new_s.count('0') != new_s.count('1'):
				parts.append(new_s)
				s = s[i:]
	print('{}\n{}'.format(len(parts), ' '.join(parts)))


n = int(input())
k = input()
if n % 2 == 1:
	print(1)
	print(k)
else:
	p = list(k)
	for i in range(n):
		p[i] = int(p[i])
	s = sum(p)
	if s == n / 2:
		o = str(p[0])
		z = ''
		for i in range(n - 1):
			z = z + str(p[i + 1])
		d = str(z)
		print(2)
		print(o + ' ' + d)
	else:
		print(1)
		print(k)


a = int(input())
b = str(input())
q = 0
for i in range(a):
	if b[i] == '1':
		q += 1
if a != q * 2:
	print(1)
	print(b)
else:
	print(2)
	print(b[0], end=' ')
	i = 0
	for i in range(1, a):
		print(b[i], end='')


n = int(input())
s = input()
cb = 0
ca = 0
for i in range(n):
	if s[i] == '0':
		ca += 1
	else:
		cb += 1
if ca != cb:
	print('1')
	print(*s, sep='')
else:
	print('2')
	print(s[0], end=' ')
	for i in range(1, n):
		print(s[i], end='')


n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	count10 = 0
	count11 = 0
	count20 = s.count('0')
	count21 = s.count('1')
	i = 0
	while count10 == count11 or count20 == count21:
		if s[i] == '0':
			count10 += 1
			count20 -= 1
		else:
			count11 += 1
			count21 -= 1
		i += 1
	print(2)
	print(s[:i], s[i:])


def good(string):
	ones = 0
	zeros = 0
	for char in string:
		if char == '0':
			zeros += 1
		elif char == '1':
			ones += 1
	return ones != zeros

def split(string):
	if good(string):
		return [string]
	else:
		return [string[0], string[1:]]
n = input()
string = input()
ans = split(string)
print(len(ans))
print(' '.join(ans))


n = int(input())
s = str(input())
l = list(s)
a = l.count('1')
b = len(l) - a
if a != b:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], end=' ')
	s1 = ''
	for i in range(1, len(l)):
		s1 = s1 + str(l[i])
	print(s1)


input()
a = list(input())

def count(a, b):
	cnt = 0
	for i in a:
		if i == b:
			cnt += 1
	return cnt
cnt0 = count(a, '0')
cnt1 = count(a, '1')
if not cnt1 == cnt0:
	print(1)
	print(''.join(a))
else:
	print(2)
	print(a[0], end=' ')
	print(''.join(a[1:]))


n = int(input())
aas = input()
if n % 2 == 1:
	print(1)
	print(aas)
elif aas.count('0') != aas.count('1'):
	print(1)
	print(aas)
else:
	print(2)
	print(aas[:-1], aas[-1])


n = int(input(''))
s = input('')
c0 = s.count('0')
c1 = s.count('1')
if c1 != c0:
	print('1')
	print(s)
else:
	c00 = 0
	c11 = 0
	for i in range(len(s)):
		if s[i] == '1':
			c11 += 1
		else:
			c00 += 1
		if c11 != c00 and c1 - c11 != c0 - c00:
			print('2')
			print(s[:i + 1], s[i + 1:])
			break


import random
x = int(input())
t = []
t = input()
if x == 1:
	print(1)
	print(t[0])
	raise SystemExit
if x % 2 == 0:
	if t.count('0') != t.count('1'):
		print(1)
		print(t)
	else:
		print(2)
		print(t[0], t[1:])
else:
	print(1)
	print(t)


from collections import Counter
n = int(input())
s = input()
c = Counter(s)
p = c['1']
q = c['0']
if p != q:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
mod = 10 ** 9 + 7
eps = 10 ** (-7)

def inp():
	return int(input())

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

def inpl_str():
	return list(input().split())
N = inp()
S = input()
if S.count('0') == S.count('1'):
	print(2)
	print(S[0], S[1:])
else:
	print(1)
	print(S)


def main():
	_ = input()
	s = input()
	l = len(s)
	count = 0
	for i in s:
		if i == '0':
			count += 1
	if count == l - count:
		print('2')
		print('{} {}'.format(s[0], s[1:]))
	else:
		print('1')
		print(s)
main()


from collections import Counter
gi = lambda : list(map(int, input().strip().split()))
(n,) = gi()
s = input()
occ = Counter(s)
if occ['1'] != occ['0']:
	print(1)
	print(s)
else:
	print(2)
	print(s[0] + ' ' + s[1:])


n = int(input())
si = input()
s = list(map(int, si))
num0 = 0
num1 = 0
for i in range(n):
	if s[i] == 1:
		num1 += 1
	else:
		num0 += 1
if num1 == num0:
	print(2)
	print(si[:n - 1], s[n - 1])
else:
	print(1)
	print(si)


n = int(input())
s = input()
(num_of_zeros, num_of_ones) = (s.count('0'), s.count('1'))
if num_of_ones == num_of_zeros:
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


size = int(input())
string = input()
val = 0
for count in string:
	if count == '0':
		val += 1
	else:
		val -= 1
if val != 0:
	print('1' + '\n' + string)
else:
	print('2' + '\n' + string[0:-1] + ' ' + string[-1])


n = int(input())
s = input()
ans = ''
a = sorted(list(s))
if a.count('1') != a.count('0'):
	print(1)
	print(s)
else:
	print(2)
	ans = ''
	print(s[:-1], s[-1])


n = int(input())
s = input()
ct_1 = s.count('1')
ct_0 = s.count('0')
if ct_1 != ct_0:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
m = input()
n1 = 0
n0 = 0
for i in m:
	if i == '1':
		n1 += 1
	else:
		n0 += 1
if n1 != n0:
	print('1')
	print(m)
else:
	print('2')
	print(m[:n - 1] + ' ' + m[n - 1:n])


input()
s = input()
a = [[0, 0] for i in range(len(s))]
for i in range(len(s)):
	a[i] = a[i - 1].copy()
	if s[i] == '0':
		a[i][0] += 1
	else:
		a[i][1] += 1
k0 = a[len(s) - 1][0]
k1 = a[len(s) - 1][1]
if k0 == k1:
	print(2)
	print(s[:len(s) - 1], s[len(s) - 1])
else:
	print(1)
	print(s)


n = int(input())
kam = input()
lam = kam.count('0')
jam = kam.count('1')
if lam != jam:
	print(1)
	print(kam)
else:
	print(2)
	print(kam[0:-1], kam[-1])


def good(s):
	if not s:
		return True
	if s.count('1') != s.count('0'):
		return True
	return False

def main():
	n = int(input())
	s = input()
	s1 = list(s)
	s2 = []
	for i in range(n):
		if good(s1) and good(s2):
			break
		s2.insert(0, s1.pop())
	sx1 = ''
	for i in s1:
		sx1 += i
	sx2 = ''
	for i in s2:
		sx2 += i
	if not sx2:
		print(1)
		print(sx1)
		return
	print(2)
	print(sx1, sx2)
main()


def analiz(st, n):
	k = 0
	for x in st:
		if x == '1':
			k += 1
	if k != n - k:
		stt.append(st)
		return True
	else:
		return False

def output(stt):
	print(len(stt))
	for i in range(len(stt)):
		print(stt[i], end=' ')
global stt, n
n = int(input())
st = input()
st1 = st2 = ''
stt = []
if analiz(st, n):
	output(stt)
else:
	st1 = st[0:n // 2]
	dl = len(st1)
	if analiz(st1, dl):
		st2 = st[n // 2:n]
		dl = len(st2)
		analiz(st2, dl)
		output(stt)
	else:
		st1 = st[0:n // 2 + 1]
		dl = len(st1)
		if analiz(st1, dl):
			st2 = st[n // 2 + 1:n]
			dl = len(st2)
			analiz(st2, dl)
			output(stt)


n = int(input())
s = input()
ones = s.count('1')
zeros = s.count('0')
if len(s) == 1:
	print(1)
	print(s)
elif ones != zeros:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
nb_1 = sum(list(map(int, list(s))))
nb_0 = len(s) - nb_1
if nb_0 != nb_1:
	print(1)
	print(s)
elif len(s) == 1:
	print(1)
	print(s)
elif len(s) == 2:
	if s[0] == s[1]:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], s[1])
elif abs(nb_0 - nb_1) > 1 or nb_0 == nb_1:
	print(2)
	print(s[0], s[1:])
else:
	print(3)
	print(s[0], s[1], s[2:])


n = int(input())
a = input()
one = 0
zero = 0
for item in a:
	if item == '1':
		one += 1
	else:
		zero += 1
if one != zero:
	print(1)
	print(a)
else:
	print(2)
	print(a[:n - 1], end=' ')
	print(a[n - 1])


def user99():
	n = int(input())
	s = input()
	if s.count('0') == s.count('1'):
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)
user99()


n = int(input())
a = input()
t = 0
for i in a:
	if i == '0':
		t += 1
	else:
		t = t - 1
if t != 0:
	print(1)
	print(a)
else:
	print(2)
	print(a[0], a[1:n])


n = int(input())
s = input()
count1 = s.count('1')
count0 = s.count('0')
if count1 != count0:
	print(1)
	print(s)
else:
	print(2)
	s1 = s[0]
	s2 = ''
	for i in range(1, n):
		s2 += s[i]
	print(s1, s2)


input()
val = input().strip()
if val.count('1') != val.count('0'):
	print('1' + '\n' + val)
else:
	print(2)
	print(val[0], val[1:])


n = int(input())
s = input()
if n % 2 == 1:
	print(1)
	print(s)
else:
	oneCount = 0
	for c in s:
		if c == '1':
			oneCount += 1
	zeroCount = n - oneCount
	if oneCount != zeroCount:
		print(1)
		print(s)
	else:
		print(2)
		print(s[:1], s[1:])


def split(s):
	for i in range(len(s)):
		first = s[:i]
		second = s[i:]
		nums_first = [first.count('0'), first.count('1')]
		nums_second = [second.count('0'), second.count('1')]
		if nums_first[0] != nums_first[1] and nums_second[0] != nums_second[1]:
			answer = first + ' ' + second
			return answer
		elif nums_first == [0, 0] and nums_second[0] != nums_second[1]:
			answer = second
			return answer
		elif nums_second == [0, 0] and nums_first[0] != nums_first[1]:
			answer = first
			return first
		else:
			print()
	return
_ = input()
s = input()
s = str(split(s))
print(s.count(' ') + 1)
print(s)


n = int(input())
l = str(input())
k = l.count('0')
t = n - k
if k != t:
	print(1)
	print(l)
if n % 2 == 0 and k == t:
	if n // 2 % 2 == 0:
		print(2)
		print(l[:n // 2 + 1] + ' ' + l[n // 2 + 1:])
	elif n // 2 % 2 != 0:
		print(2)
		print(l[:n // 2] + ' ' + l[n // 2:])
if n % 2 != 0 and k == t:
	print(1)
	print(l)


n = int(input())
x = 0
y = 0
s = input()
for i in range(n):
	if s[i] == '0':
		x += 1
	else:
		y += 1
if x == y:
	print(2)
	print(s[:n - 1], s[n - 1])
else:
	print(1)
	print(s)


from sys import stdin
from collections import deque
import bisect
n = int(input())
s = input().rstrip()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	print(2)
	print(s[0:n - 1], s[n - 1])


def check_good(num):
	num1 = num
	num = [int(i) for i in num]
	if len(num1) / 2 == sum(num):
		return False
	return True
z = input()
input_string = input()
if check_good(input_string):
	print(1)
	print(input_string)
elif len(input_string) <= 2:
	print(2)
	print(input_string[:int(len(input_string) // 2)], input_string[int(len(input_string) // 2):], sep=' ')
else:
	for i in range(0, len(input_string) - 1):
		if check_good(input_string[:i + 1]) and check_good(input_string[i + 1:]):
			print(2)
			print(input_string[:i + 1], input_string[i + 1:], sep=' ')
			break


n = int(input())
s = [int(i) for i in input()]

def get_str(s_in):
	a = ''
	for i in s_in:
		a = a + str(i)
	return a
if sum(s) != len(s) - sum(s):
	print(1)
	print(get_str(s))
else:
	print(2)
	print(str(s[0]) + ' ' + get_str(s[1:]))


n = int(input())
x = input()
count = 0
count1 = 0
for i in range(n):
	if x[i] == '1':
		count = count + 1
	else:
		count1 = count1 + 1
if count1 == count:
	print('2')
	print(x[0:n - 1], x[-1])
else:
	print('1')
	print(x)


n = int(input())
s = input()
no = s.count('0')
if 2 * no != n:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
_0 = s.count('0')
_1 = s.count('1')
if _1 != _0:
	print(1)
	print(s)
elif _1 == _0:
	print(2)
	print(s[0], s[1:])


from collections import Counter
n = int(input())
s = input().strip()
dict1 = Counter(s)
cnt = 0
sn = ''
if dict1.get('0', 0) == dict1.get('1', 0):
	for i in range(n):
		dict1[s[i]] -= 1
		sn += s[i]
		if dict1.get('0', 0) != dict1.get('1', 0):
			print(2)
			print(sn, s[i + 1:])
			break
else:
	cnt += 1
	print(cnt)
	print(s)


import collections
n = int(input())
s = input()
if n % 2 == 1:
	print(1)
	print(s)
else:
	sum = 0
	for c in s:
		sum += int(c)
	if 2 * sum != n:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0:1], s[1:])


n = int(input())
s = input()

def is_ok(s1, s2):
	(z1, o1) = (0, 0)
	for ch in s1:
		if ch == '1':
			o1 += 1
		else:
			z1 += 1
	if z1 == o1:
		return False
	(z2, o2) = (0, 0)
	for ch in s2:
		if ch == '1':
			o2 += 1
		else:
			z2 += 1
	if z2 == o2:
		return False
	return True
if n % 2 != 0:
	print(1)
	print(s)
elif n == 2:
	if s[1] == s[0]:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], end=' ')
		print(s[1], end='')
		print('\n', end='')
else:
	(z1, o1) = (0, 0)
	for ch in s:
		if ch == '1':
			o1 += 1
		else:
			z1 += 1
	if z1 != o1:
		print(1)
		print(s)
	else:
		mid = n // 2
		s1 = s[:mid]
		s2 = s[mid:]
		if is_ok(s1, s2) == False:
			s1 = s[:mid - 1]
			s2 = s[mid - 1:]
		print(2)
		print(s1, end=' ')
		print(s2, end='')
		print('\n', end='')


a = int(input())
b = str(input())
count1 = 0
count2 = 0
py_list = []
for i in str(b):
	py_list.append(i)
for i in range(0, a):
	if py_list[i] == '1':
		count1 += 1
	else:
		count2 += 1
if count1 == count2:
	print(2)
	for i in range(a - 1):
		print(py_list[i], end='')
else:
	print(1)
	print(b)
	exit()
print(' ', end='')
print(py_list[a - 1])


n = int(input())
s = input()
if len(set(s)) == 1:
	print(1)
	print(s)
	exit()
z = s.count('0')
o = s.count('1')
if z == o:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


length = int(input())
string_of_binary_digits = input()
sum = 0
for i in range(length):
	sum += int(string_of_binary_digits[i])
final_sum = sum
if length % 2 == 1:
	print(1)
	print(string_of_binary_digits)
elif length % 2 == 0 and length / 2 != final_sum:
	print(1)
	print(string_of_binary_digits)
elif length % 2 == 0 and length / 2 == final_sum:
	print(2)
	print(string_of_binary_digits[0:length - 1] + ' ' + string_of_binary_digits[length - 1:length])


n = int(input())
s = input()
if n % 2 == 0:
	c = 0
	d = 0
	for i in range(n):
		if s[i] == '0':
			c = c + 1
		else:
			d = d + 1
	if c == n or d == n or c != d:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0] + ' ' + s[1:n])
else:
	print(1)
	print(s)


x = int(input())
y = list(str(input()))
dic = {}
dic['0'] = y.count('0')
dic['1'] = y.count('1')
if len(y) == 1:
	print('1\n' + ''.join(y))
elif dic['0'] != dic['1']:
	print('1\n' + ''.join(y))
else:
	print('2\n' + y[0], ''.join(y[1:]))


n = int(input())
s = input()
t = True
if s.count('0') != s.count('1'):
	print(1)
	print(s)
	t = False
if n > 1 and t:
	print(2)
	print(s[:1], end=' ')
	print(s[1:])
elif n == 1 and t:
	print(1)
	print(1)


n = int(input())
l = list(input())
if l.count('1') != l.count('0'):
	print(1)
	print(''.join(l))
else:
	print(2)
	print(l[0], end=' ')
	print(''.join(l[1:]))


n = int(input())
s = input()
(a, b) = (0, 0)
for item in s:
	if item == '0':
		a += 1
	else:
		b += 1
if a != b:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
stri = input()
count = 0
for i in range(n):
	if stri[i] == '1':
		count += 1
if n % 2 == 0 and n // 2 == count:
	print(2)
	print(stri[0] + ' ' + stri[1:])
else:
	print(1)
	print(stri)


from collections import Counter
n = int(input())
ss = list(input())
cnt = Counter(ss)
if '1' in cnt and '0' in cnt and (cnt['1'] == cnt['0']):
	print(2)
	print(''.join(ss[:1]), ''.join(ss[1:]))
else:
	print(1)
	print(''.join(ss))


def main():
	t = int(input())
	s = input()
	if len(s) == 1:
		print(1)
		print(s)
		return
	else:
		z = 0
		one = 0
		for i in s:
			if i == '0':
				z += 1
			elif i == '1':
				one += 1
		if z == one:
			print(2)
			start = s[0]
			if len(s) == 2:
				print(s[0] + ' ' + s[1])
				return
			else:
				for j in range(1, len(s)):
					if s[j] != start:
						print(s[:j] + ' ' + s[j:])
						return
		elif z != one:
			print(1)
			print(s)
			return
main()


def hor(s):
	if s.count('0') == s.count('1'):
		return False
	return True
n = int(input())
s = input()
if hor(s):
	print(1)
	print(s)
else:
	for i in range(n):
		if hor(s[:i]) and hor(s[i:]):
			print(2)
			print(s[:i], ' ', s[i:])
			break


def soln() -> None:

	def is_good(x: str) -> bool:
		if x.count('1') == len(x) / 2:
			return False
		return True

	def logic() -> None:
		n = int(input())
		s = input()
		if is_good(s):
			print(1, s, sep='\n')
			return
		print(2)
		print(s[:-1], s[-1])
	logic()
soln()


def sum(nn, l):
	num0 = 0
	num1 = 0
	for i in range(nn):
		if l[i] == '0':
			num0 += 1
		if l[i] == '1':
			num1 += 1
	if num0 == num1:
		return 'true'
	else:
		return 'false'
n = int(input())
s = input()
l = list(s)
if n % 2 != 0:
	print(1)
	print(s)
	raise SystemExit
if n == 2 and s == '01':
	print(2)
	print('0 1')
elif n == 2 and s == '10':
	print(2)
	print('1 0')
elif n == 2:
	print(1)
	print(s)
elif sum(n, l) == 'true':
	print(2)
	print(s[0], s[1:])
else:
	print(1)
	print(s)


def check(s):
	if s.count('0') != s.count('1'):
		return True
	return False

def solve(a, res):
	if check(a):
		res.append(a)
		return res
	for i in range(len(a)):
		if check(a[:i + 1]):
			res.append(a[:i + 1])
			return solve(a[i + 1:], res)
n = int(input())
s = input().strip()
res = solve(s, [])
print(len(res))
print(*res, end=' ')
l = 0


import sys
input = lambda : sys.stdin.readline().strip()
n = int(input())
s = input()
zero = 0
for i in s:
	if i == '0':
		zero += 1
one = n - zero
if one != zero:
	print(1)
	print(s)
else:
	print(2)
	print(s[:-1], s[-1])


a = int(input())
string = input()
balance = 0
for char in string:
	if char == '0':
		balance += 1
	else:
		balance -= 1
if balance != 0:
	print('1' + '\n' + string)
else:
	print('2' + '\n' + string[0:-1] + ' ' + string[-1])


from sys import stdin, stdout, exit
n = int(input())
s = input()
ones = len([c for c in s if c == '1'])
zeros = n - ones
if ones != zeros:
	print(1)
	print(s)
	exit()
print(2)
print(s[0], s[1:])


n = int(input())
string = str(input())
counter = 0
for lol in range(len(string)):
	if string[lol] == '0':
		counter += 1
	elif string[lol] == '1':
		counter -= 1
if counter != 0:
	print(1)
	print(string)
else:
	print(2)
	print(string[0], string[1:len(string)])


def div_s(n, s):
	if n == 1 or s.count('0') != s.count('1'):
		return s
	center = 1
	while True:
		left = s[:center]
		right = s[center:]
		if left.count('0') == left.count('1') or right.count('0') == right.count('1'):
			center += 1
		else:
			break
	return left + ' ' + right
n = int(input())
s = input()
result = div_s(n, s)
result = result.split(' ')
print(len(result))
print(' '.join(result))


n = int(input())
s = str(input())
count_of_ones = s.count('1')
count_of_zeroes = s.count('0')
a = n - 1
if s is '1':
	print(len([s]))
	print(s)
elif s.count('1') != s.count('0'):
	print(len([s]))
	print(s)
else:
	while a != 0:
		substrings = []
		check = []
		for x in range(0, n, a):
			substrings.append(' ' + s[x:x + a])
		for y in range(len(substrings)):
			if substrings[y].count('1') != substrings[y].count('0'):
				pass
			elif substrings[y].count('1') == substrings[y].count('0'):
				check.append(0)
				a -= 1
		if 0 not in check:
			substrings[0] = substrings[0].replace(' ', '')
			print(len(substrings))
			print(''.join(substrings))
			break
		a -= 1


n = int(input())
s = input()
a = s.count('0')
b = s.count('1')
if a != b:
	print(1)
	print(s)
else:
	i = 0
	if len(s) >= 3:
		while i < len(s):
			if s[:i].count('0') != s[:i].count('1') and s[i:].count('0') != s[i:].count('1'):
				print(2)
				print(s[:i], s[i:])
				break
			i += 1
	else:
		print(2)
		print(*list(s))


n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	i = 0
	(f0, f1) = (0, 0)
	x = n // 2
	while f1 == f0:
		m = s[:x + i]
		f1 = m.count('1')
		f0 = m.count('0')
		i += 1
	print(2)
	print(m, s[n // 2 + i - 1:])


n = int(input())
s = str(input())
z = s.count('1')
u = s.count('0')
l = len(s)
if n == 1 and s == 1:
	print(1)
	print(1)
elif z != u:
	print(1)
	print(s)
elif z == u:
	print(2)
	print(s[0], s[1:])
elif n == 1 and s == 0:
	print(1)
	print(0)


R = lambda : map(int, input().split())
n = int(input())
string = input()
if string.count('0') == n or string.count('1') == n:
	print(1)
	print(string)
	exit()
if string.count('0') != string.count('1'):
	print(1)
	print(string)
	exit()
for i in range(n):
	first = string[0:i]
	last = string[i:n]
	if first.count('1') != first.count('0') and last.count('1') != last.count('0'):
		print(2)
		print(first + ' ' + last)
		exit()


n = int(input())
text = input()
if text.count('1') == text.count('0'):
	print(2)
	print(text[0], text[1:])
else:
	print(1)
	print(text)


def main():
	n = int(input())
	s = input()
	ct = 0
	for i in range(n):
		if s[i] == '1':
			ct = ct + 1
	if n - ct != ct:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0:n - 1] + ' ' + s[n - 1])
main()


n = int(input())
s = str(input())
n1 = 0
n0 = 0
for i in range(n):
	if int(s[i]) == 1:
		n1 += 1
	else:
		n0 += 1
if n1 != n0:
	print(1)
	print(s)
else:
	print(2)
	print(s[:n - 1], s[n - 1:])


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

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
a = ii()
s = input()
if s.count('0') == s.count('1'):
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


def check(a, b):
	if a.count('1') != a.count('0') and b.count('1') != b.count('0'):
		return True
	return False
n = int(input())
s = input()
if s.count('1') != s.count('0'):
	print(1)
	print(s)
else:
	for i in range(n):
		a = s[:i + 1]
		b = s[i + 1:]
		if check(a, b):
			print(2)
			print(a, b)
			break


n = int(input())
s = str(input())
s1 = s0 = 0
for i in s:
	if i == '1':
		s1 += 1
	elif i == '0':
		s0 += 1
if s1 != s0:
	print(1)
	print(s)
elif s1 == s0:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
tcount0 = tcount1 = 0
for i in range(n):
	if s[i] == '1':
		tcount1 += 1
	else:
		tcount0 += 1
if tcount0 != tcount1:
	print(1)
	print(s)
else:
	count0 = count1 = 0
	for i in range(n):
		if s[i] == '1':
			count1 += 1
		else:
			count0 += 1
		if count1 != count0:
			if tcount1 - count1 != tcount0 - count0:
				print(2)
				print(s[:i + 1] + ' ' + s[i + 1:])
				break


t = int(input())
a = list(input())
c_0 = a.count('0')
if c_0 != t - c_0:
	print(1)
	print(''.join(a))
	exit()
else:
	print(2)
	l = a[0]
	a = a[1:]
	print(l, ''.join(a))


n = int(input())
s = input()
one = [0] * n
o = 0
z = 0
zero = [0] * n
for i in range(n):
	if s[i] == '1':
		o += 1
	else:
		z += 1
	one[i] = o
	zero[i] = z
if o != z:
	print(1)
	print(s)
else:
	for i in range(1, n):
		o1 = 0
		z1 = 0
		x = i
		for j in range(0, i):
			if s[j] == '1':
				o1 += 1
			else:
				z1 += 1
		o2 = 0
		z2 = 0
		for j in range(i, n):
			if s[j] == '1':
				o2 += 1
			else:
				z2 += 1
		if o1 != z1 and o2 != z2:
			print(2)
			print(s[:x], s[x:])
			break


input()
s = input()

def checker(x):
	return x.count('0') != x.count('1')
if checker(s):
	print('1\n' + s)
else:
	print('2\n' + s[0] + ' ' + s[1:])


n = int(input())
s = input()
ones = 0
zs = 0
for c in s:
	if c == '1':
		ones += 1
	elif c == '0':
		zs += 1
if ones != zs:
	print(1)
	print(s)
else:
	print(2)
	print(s[:-1], s[-1])


from collections import Counter
import sys
_ = input()
s = input()
c = Counter(s)
(o, z) = (c['1'], c['0'])
if o == 0:
	print(1)
	print(''.join(('0' for _ in range(z))))
	sys.exit(0)
if z == 0:
	print(1)
	print(''.join(('1' for _ in range(o))))
	sys.exit(0)
if o != z:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


import sys

class AKeanuReeves:

	def solve(self):
		n = int(input())
		s = input()
		if s.count('0') != s.count('1'):
			print(1)
			print(s)
		else:
			print(2)
			print(s[0], s[1:])
solver = AKeanuReeves()
input = sys.stdin.readline
solver.solve()


n = int(input())
s = input()
ones = s.count('1')
zeros = s.count('0')
if ones == zeros:
	print('2')
	print(f'{s[0]} {s[1:]}')
else:
	print('1')
	print(f'{s}')


input()
a = input()
c0 = 0
c1 = 0
for i in a:
	if i == '1':
		c1 += 1
	else:
		c0 += 1
if c0 == c1:
	print(2)
	print(a[0], a[1:])
else:
	print(1)
	print(a)


n = int(input())
s = input()
l = list(s)
l1 = l[1:]

def listToString(s):
	str1 = ''
	for ele in s:
		str1 += ele
	return str1
if l.count('0') != l.count('1'):
	print(1)
	print(listToString(l))
elif l1.count('0') == l1.count('1'):
	if l[0] == '0' and l1[0] == '0':
		print(2)
		print('00', listToString(l1[1:]))
	elif l[0] == '0' and l1[0] == '1':
		print(3)
		print(0, 1, listToString(l1[1:]))
	elif l[0] == '1' and l1[0] == '0':
		print(3)
		print(0, 1, listToString(l1[1:]))
	else:
		print(2)
		print('11', listToString(l1[1:]))
else:
	print(2)
	print(l[0], listToString(l1))


from math import inf

def solve(n, s):
	c1 = s.count('1')
	c0 = s.count('0')
	if c1 != c0:
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], s[1:])

def main():
	n = int(input())
	s = input()
	solve(n, s)
main()


n = int(input())
s = input()
nules = 0
for i in range(n):
	if int(s[i]) == 0:
		nules += 1
if nules != n - nules:
	print(1)
	print(s)
else:
	print(2)
	nules = 0
	for i in range(n):
		if int(s[i]) == 0:
			nules += 1
		if nules != i + 1 - nules:
			print(s[:i + 1], s[i + 1:])
			break


n = int(input())
s = input()

def sum1(a):
	k1 = 0
	k2 = 0
	for j in range(len(a)):
		if a[j] == '1':
			k1 = k1 + 1
		else:
			k2 = k2 + 1
	return k1 != k2
if sum1(s) == 1:
	print('1')
	print(s)
else:
	print('2')
	print(s[0:len(s) - 1], s[len(s) - 1])


n = int(input())
s = input()
d = s.count('0')
e = s.count('1')
if d == e:
	print(2)
	print(s[0] + ' ' + s[1:])
else:
	print(1)
	print(s)


n = int(input())
s = input()
cz = s.count('0')
co = s.count('1')
if co != cz or n == 1:
	print('1')
	print(s)
else:
	print('2')
	s = list(s)
	print(''.join(s[:1]), ''.join(s[1:]))


n = int(input())
s = input()
numof0 = 0
numof1 = 0
if n != 1:
	for i in range(n):
		if s[i] == '0':
			numof0 += 1
		elif s[i] == '1':
			numof1 += 1
	if numof0 != numof1:
		ret1 = 1
		ret2 = s
	else:
		ret1 = 2
		ret2 = s[0:n - 1] + ' ' + s[n - 1:]
else:
	ret1 = 1
	ret2 = s
print(ret1)
print(ret2)


n = int(input())
a = list(input())
c0 = a.count('0')
c1 = a.count('1')
if c0 ^ c1:
	print(1)
	print(''.join(a))
else:
	print(2)
	print(a[0], ''.join(a[1:]))


n = int(input())
a = input()
c0 = 0
c1 = 0
for i in range(len(a)):
	if a[i] == '0':
		c0 += 1
	else:
		c1 += 1
if c0 == c1 and c0 > 0 and (c1 > 0):
	print(2)
	print(a[:-1] + ' ' + a[-1])
elif c0 == 0 or c1 == 0:
	print(1)
	print(a)
else:
	print(1)
	print(a)


n = int(input())
s = input()
zero = 0
one = 0
for letter in s:
	if letter == '0':
		zero += 1
	else:
		one += 1
if zero != one:
	print('1\n' + s)
else:
	print('2\n' + s[0] + ' ' + s[1:])


a = int(input())
b = input()
nulls = b.count('0')
ones = b.count('1')
if nulls == ones:
	print(2)
	print(b[0] + ' ' + b[1:])
else:
	print(1)
	print(b)


input()
word = input()
cnt = [0, 0]
for w in word:
	cnt[int(w)] += 1
if cnt[0] == cnt[1]:
	print(2)
	print(word[0])
	print(word[1:])
else:
	print(1)
	print(word)


def solve(s):
	for i in range(1, len(s)):
		be_ones = s[:i].count('1')
		be_zeroes = s[:i].count('0')
		af_ones = s[i:].count('1')
		af_zeroes = s[i:].count('0')
		if be_ones != af_ones or be_zeroes != af_zeroes:
			print(2)
			print(s[:i], s[i:])
			break
n = int(input())
s = str(input())
ones = s.count('1')
zeroes = s.count('0')
if ones == zeroes:
	if len(s) == 1:
		print(1)
		print(s)
	else:
		solve(s)
else:
	print(1)
	print(s)


from math import *
from itertools import *
from collections import *
from bisect import *
n = int(input())
s = input()
ones = s.count('1')
zeroes = n - ones
if ones != zeroes:
	print(1)
	print(s)
else:
	for i in range(1, n + 1):
		ao = s[:i].count('1')
		az = i - ao
		if ao != az and ones - ao != zeroes - az:
			print(2)
			print(s[:i], s[i:])
			break


n = int(input())
string = list(map(str, list(input())))
zero = string.count('0')
one = n - zero
if one != zero:
	print(1)
	print(''.join(string))
else:
	print(2)
	print(string[0], end=' ')
	print(''.join(string[1:n]))


n = int(input())
s = input()
l = list(s)
count = sum(map(int, l))
if count != n / 2:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
ones = 0
for i in s:
	if i == '1':
		ones = ones + 1
zeroes = n - ones
if ones != zeroes:
	print('1')
	print(s)
else:
	s_ = ''
	print('2')
	for i in range(0, len(s)):
		if i != n - 1:
			s_ = s_ + s[i]
	print(s_, s[-1])


n = int(input())
a = input()
count = 0
if n % 2 != 0:
	print(1)
	print(a)
else:
	for i in a:
		if i == '1':
			count = count + 1
	if count == n // 2:
		print(2)
		print(a[:n - 1], end=' ')
		print(a[n - 1])
	else:
		print(1)
		print(a)


class Solution(object):

	def getSolMain(self, x):
		ones = 0
		zeroes = 0
		for c in x:
			if c == '0':
				zeroes += 1
			else:
				ones += 1
		if ones != zeroes:
			print(1)
			print(x)
		else:
			print(2)
			print(x[0], x[1:])
n = input()
test = input()
s = test
sol = Solution()
sol.getSolMain(test)


n = int(input())
s = input()
cnt1 = sum(map(lambda x: int(x), s))
cnt0 = len(s) - cnt1
if cnt0 != cnt1:
	print('1\n{}'.format(s))
else:
	print('2\n{} {}'.format(s[0], s[1:]))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

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

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	s = S()
	if len(s) % 2 != 0:
		print(1)
		print(s)
	elif len(s) // 2 == s.count('0'):
		print(2)
		print(s[0], s[1:])
	else:
		print(1)
		print(s)
main()


a = int(input())
t = input()
u = t.count('1')
v = t.count('0')
if u == v:
	print(2)
	print(t[0:len(t) - 1] + ' ' + t[len(t) - 1])
else:
	print(1)
	print(t)


n = int(input())
string = input()
count0 = 0
count1 = 0
temp0 = string.count('0')
temp1 = string.count('1')
if temp1 != temp0:
	print(1)
	print(string)
else:
	print(2)
	print(string[:1], string[1:])


num = int(input())
rawInput = input()
parsedInput = list(rawInput)
goods = []
one = 0
zero = 0
for item in parsedInput:
	if item == '0':
		zero += 1
	if item == '1':
		one += 1
if zero != one or len(parsedInput) % 2 == 1:
	print(1)
	print(''.join(parsedInput))
else:
	print(2)
	print(''.join(parsedInput[0:-1]), ''.join(parsedInput[-1:]))


n = int(input())
s = input()
li = list(s)
c = li.count('1')
d = li.count('0')
if len(list(set(li))) == 1:
	print('1')
	print(s)
elif c == d:
	print('2')
	print(''.join(li[:1]), end=' ')
	print(''.join(li[1:]))
elif c != d:
	print('1')
	print(s)
else:
	q = 0


n = int(input().strip())
s = input().strip()
toprint = ''

def calc(s, sp):
	global toprint
	if s == '' and sp == '':
		return 0
	elif s == '':
		return calc(sp, '')
	elif sp == '':
		if s.count('0') == len(s) / 2.0:
			return calc(s[:-1], s[-1])
		else:
			toprint += ' ' + s
			return 1
	if s.count('0') != len(s) / 2.0 and sp.count('0') != len(sp) / 2.0:
		toprint += ' ' + s + ' ' + sp
		return 2
	elif sp.count('0') != len(sp) / 2.0:
		a = calc(s[:-1], s[-1] + sp)
		b = 1 + calc(s, '')
		if b < a:
			toprint += ' ' + sp
		return min(a, b)
	elif s.count('0') != len(s) / 2.0:
		a = calc(s[:-1], s[-1] + sp)
		b = 1 + calc(sp, '')
		if b < a:
			toprint += ' ' + s
		return min(a, b)
	else:
		return calc(s[:-1], s[-1] + sp)
if s.count('0') != n / 2.0:
	print(str(1) + '')
	print(s)
else:
	print(calc(s, ''))
	print(toprint.strip())


def good(string):
	length = len(string)
	count = 0
	for i in string:
		if i == '0':
			count += 1
	if count == length - count:
		return False
	else:
		return True
data = []

def func(string):
	if good(string):
		data.append(string)
		return data
	count1 = 0
	count0 = 0
	for i in range(len(string)):
		if string[i] == '1':
			count1 += 1
		else:
			count0 += 1
		if count1 == count0:
			data.append(string[:i])
			if good(string[i:]):
				data.append(string[i:])
				return data
			else:
				func(string[i:])
n = int(input())
string = input()
if n == 1:
	print(1)
	print(string)
else:
	a = func(string)
	print(len(a))
	for i in a:
		print(i, end=' ')


n = int(input())
s = input()
k = 0
for c in s:
	if c == '1':
		k += 1
if k != n - k:
	print(1)
	print(*s, sep='')
else:
	print(2)
	print(s[0], end=' ')
	print(*s[1:], sep='')


n = int(input())
cadena = input()
unos = cadena.count('1')
ceros = cadena.count('0')
if unos != ceros:
	print(1)
	for i in range(n):
		print(int(cadena[i]), end='')
elif n == 1:
	print('xd')
	print(1)
	print(int(cadena[0]))
else:
	print(2)
	for i in range(n - 1):
		print(int(cadena[i]), end='')
	print('', int(cadena[n - 1]))


n = int(input())
s = input()
l = len(s)
c = 0
if n % 2 != 0:
	print('1' + '\n' + s)
else:
	for i in s:
		if i == '0':
			c += 1
		else:
			c -= 1
	if c == 0:
		print('2')
		print(s[:l - 1] + ' ' + s[l - 1])
	else:
		print('1' + '\n' + s)


n = int(input())
s = str(input())
array = []
counter0 = 0
counter1 = 0
for elem in s:
	if elem == '0':
		counter0 += 1
	if elem == '1':
		counter1 += 1
if counter0 == counter1:
	print(2)
	print(s[:-1], s[-1:])
else:
	print(1)
	print(s)


import sys
input = sys.stdin.readline

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

def mi():
	return map(int, input().rstrip().split())

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

def li():
	return list(input().rstrip())

def main():
	n = ii()
	s = li()
	s1 = s.count('1')
	s0 = s.count('0')
	if n == 1:
		print(1)
		print(s[0])
		sys.exit()
	if s1 == s0:
		print(2)
		print(s[0], ''.join(s[1:]))
	else:
		print(1)
		print(''.join(s))
main()


import math
from collections import Counter, defaultdict
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
n = I()
s = input()
a = s.count('0')
b = s.count('1')
v = 1
for i in range(n - 1, -1, -1):
	if a != b:
		print(v)
		print(s[0:i + 1], s[i + 1::n])
		break
	else:
		v = 2
	if s[i] == '1':
		b -= 1
	else:
		a -= 1


le = int(input())
num = input()
if num.count('1') != num.count('0'):
	print(1)
	print(num)
else:
	print(2)
	print(num[0], end=' ')
	print(num[1:])


x = int(input())
y = list(input())
if y.count('1') != y.count('0'):
	print(1)
	print(''.join(y))
else:
	print(2)
	print(y[0], ''.join(y[1:x]))


n = int(input())
s = list(input())
b = 0
c = 0
for i in range(n):
	if s[i] == '0':
		b = b + 1
	else:
		c = c + 1
if b != c:
	print('1')
	for i in range(n):
		print(s[i], end='')
else:
	print('2')
	for i in range(n - 1):
		print(s[i], end='')
	print(' ', end='')
	print(s[n - 1])


n = int(input())
s = input()
z = s.count('0')
o = s.count('1')
if z != o:
	print(1)
	print(''.join(s))
else:
	print(2)
	print(''.join(s[:1]), end=' ')
	print(''.join(s[1:]))


from sys import stdin
inp = lambda : stdin.readline().strip()
n = int(inp())
s = inp()
ones = 0
zero = 0
for i in s:
	if i == '0':
		zero += 1
	else:
		ones += 1
if ones == zero:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
l = str(input())
if len(l) % 2 != 0:
	print(1)
	print(l)
elif l.count('0') == l.count('1'):
	print(2)
	print(l[:len(l) - 1], end=' ')
	print(l[-1])
else:
	print(1)
	print(l)


import sys

def cut_string(n, string):
	if n % 2 != 0:
		return (1, [string])
	zeros_count = 0
	for ch in string:
		if ch == '0':
			zeros_count += 1
	if zeros_count == n // 2:
		return (2, [string[:-1], string[-1]])
	else:
		return (1, [string])
index = 0
for line in sys.stdin:
	index += 1
	if index == 1:
		n = int(line)
		continue
	string = line.rstrip()
	(k, answer) = cut_string(n, string)
	print(k)
	print(' '.join(answer))


def main():
	n = int(input())
	s = input()
	f = [0, 0]
	for ch in s:
		if ch == '0':
			f[0] = f[0] + 1
		else:
			f[1] = f[1] + 1
	if f[0] == f[1]:
		print(2)
		print(s[:n - 1], s[n - 1:])
	else:
		print(1)
		print(s)
main()


length = int(input())
s = input()
pre = 0
(zeros, ones) = (0, 0)
for i in range(len(s)):
	if s[i] == '1':
		ones += 1
	else:
		zeros += 1
if ones != zeros:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
s = input()
a = 0
b = 0
for i in range(n):
	if s[i] == '1':
		a += 1
	elif s[i] == '0':
		b += 1
if a != b:
	print(1)
	print(s)
elif n == 2:
	print(2)
	print(s[0], s[1])
else:
	c = []
	d = []
	for j in range(1, n):
		c = s[:j]
		d = s[j:]
		g = 0
		h = 0
		l = 0
		m = 0
		for k in range(j):
			if c[k] == '1':
				g += 1
			else:
				h += 1
		for k in range(n - j):
			if d[k] == '1':
				l += 1
			else:
				m += 1
		if g != h and l != h:
			print(2)
			print(c, d)
			break


n = int(input())
a = str(input())
if a.count('0') != a.count('1'):
	print(1)
	print(a)
elif n % 4 == 0:
	print(2)
	print(a[:1 + len(a) // 2], a[1 + len(a) // 2:])
else:
	print(2)
	print(a[:len(a) // 2], a[len(a) // 2:])


n = int(input())
s = input()
(z, o) = (0, 0)
for i in range(len(s)):
	if s[i] == '0':
		o += 1
	else:
		z += 1
if o != z:
	print(1)
	print(s)
else:
	(zz, oo, idx) = (0, 0, -1)
	for i in range(len(s)):
		if s[i] == '0':
			oo += 1
		else:
			zz += 1
		if zz != oo and z - zz != o - oo:
			idx = i
			break
	print(2)
	print(s[0:idx + 1], s[idx + 1:n])


def is_good(string):
	ones = 0
	zeroes = 0
	for i in string:
		if i == '1':
			ones += 1
		else:
			zeroes += 1
	if ones == zeroes:
		return False
	return True
n = int(input())
string = input()
if is_good(string):
	print(1)
	print(string)
else:
	print(2)
	print(string[:-1], end=' ')
	print(string[-1])


n = int(input())
s = input()
c1 = s.count('1')
c2 = s.count('0')
if c1 == c2:
	print('2')
	t = s[0] + ' ' + s[1:]
	print(t)
else:
	print('1')
	print(s)


import sys
import os
from io import IOBase, BytesIO

def main():
	n = int(input())
	s = input()
	from collections import Counter
	d = Counter(s)
	if len(d) == 1:
		print(1)
		print(s)
		return
	if d['1'] != d['0']:
		print(1)
		print(s)
		return
	if n == 2:
		print(2)
		print(s[0], s[1])
		return
	i = n // 2
	s1 = s[:i]
	s2 = s[i:]
	(z1, o1) = (0, 0)
	for j in s1:
		if j == '1':
			o1 += 1
		else:
			z1 += 1
	if o1 != z1:
		print(2)
		print(s1, s2)
		return
	print(2)
	i -= 1
	print(s[:i], s[i:])
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		py2 = round(0.5)
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2 == 1:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

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

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

def input():
	return sys.stdin.readline().strip()
main()


import sys
sys.setrecursionlimit(1000000)

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def next(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = self.next_line()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_line(self):
		return sys.stdin.readline().split()

	def next_ints(self):
		return [int(x) for x in sys.stdin.readline().split()]

	def next_int(self):
		return int(self.next())

	def solve(self):
		n = self.next_int()
		s = self.next()
		if s.count('0') * 2 != len(s):
			print(1)
			print(s)
		else:
			print(2)
			print(s[:1], s[1:])
Main().solve()


n = int(input())
s = input()
if n % 2 == 1:
	print(1)
	print(s)
elif sum(map(int, s)) * 2 == n:
	print(2)
	print(s[:-1], s[-1])
else:
	print(1)
	print(s)


from collections import Counter
n = int(input())
s = input()
l = list(s)
c = Counter(l)
if c['1'] != c['0']:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


def cut(s):
	(count1, count2) = (0, 0)
	for i in range(len(s)):
		if s[i] == '1':
			count1 += 1
		else:
			count2 += 1
	if count1 == count2:
		return (s[0] + ' ' + s[1:], 2)
	else:
		return (s, 1)
n = int(input())
s = input()
a = cut(s)
print(a[1])
print(a[0])


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
yes = 'YES'
no = 'NO'
t = 1
for tt in range(t):
	n = int(input())
	s = str(input())
	if s.count('1') != s.count('0'):
		print(1)
		print(s)
	else:
		print(2)
		print(s[0], s[1:])
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


_ = input()
s = input()
if len(s) % 2 != 0 or len(s.replace('0', '')) != len(s) // 2:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


n = int(input())
a = list(input())
if a.count('1') != a.count('0'):
	print(1)
	print(*a, sep='')
else:
	print(2)
	print(*a[0], end=' ')
	print(*a[1:], sep='')


import sys
import math
import bisect

def main():
	n = int(input())
	s = input()
	if n % 2 == 1:
		print(1)
		print(s)
	else:
		one = 0
		for c in s:
			if c == '1':
				one += 1
		if one * 2 != n:
			print(1)
			print(s)
		else:
			print(2)
			print('%s %s' % (s[0], s[1:]))
main()


import math
(n, s) = (int(input()), input())
if s.count('0') == s.count('1'):
	t = max(1, (n // 2 + 1, n // 2)[n // 2 % 2 == 1])
	print(math.ceil(n / t))
	for _ in range(0, n, t):
		print(s[_:_ + t], end=' ')
else:
	print(1)
	print(s)


def is_ok(param):
	c0 = 0
	c1 = 0
	for c in param:
		if c == '0':
			c0 += 1
		elif c == '1':
			c1 += 1
	return c1 != c0

def main():
	n = input()
	m = input()
	vals = []
	while m != '':
		for i in range(len(m), 0, -1):
			if is_ok(m[0:i]):
				vals.append(m[0:i])
				m = m[i:]
				break
	print(len(vals))
	print(' '.join(vals))
main()


n = int(input())
str1 = input()
str2 = ''
str3 = ''
count1 = 0
count2 = 0
for i in range(0, n):
	if str1[i] == '0':
		count1 += 1
	else:
		count2 += 1
if count1 != count2:
	print(1)
	print(str1)
	exit()
s = 0
for i in range(0, n):
	if str1[i] == '0':
		count1 -= 1
		s = i
	else:
		count2 -= 1
		s = i
	if count1 != count2:
		s = i
		break
str2 = str1[:i + 1]
str3 = str1[i + 1:]
print(2)
print(str2, str3)


n = int(input())
a = input()
b = c = 0
for i in a:
	if i == '1':
		b += 1
	else:
		c += 1
if b != c:
	print(1)
	print(''.join(a))
else:
	print(2)
	b = a[0]
	c = a[1:]
	print(b, c)


from sys import stdin
n = int(stdin.readline().strip())
s = stdin.readline().strip()
cnt0 = 0
cnt1 = 0
for i in range(n):
	if s[i] == '0':
		cnt0 += 1
	else:
		cnt1 += 1
if cnt0 != cnt1:
	print(1)
	print(s)
else:
	print(2)
	print(s[0], s[1:])


input()
X = input()
Counts = [X.count('1'), X.count('0')]
print('1' + '\n' + X if 0 in Counts or Counts[0] != Counts[1] else '2' + '\n' + X[0] + ' ' + X[1:])


from collections import Counter
n = int(input())
s = input()
d = Counter(s)
if d['1'] != d['0']:
	print(1, s)
else:
	print(2)
	print(s[:-1], s[-1], sep=' ')


input()
s = input()
print(('2 ' + s[0] + ' ' + s[1:], '1 ' + s)[s.count('1') != len(s) / 2])


while True:
	try:
		n = int(input())
		str = input()
		x = 0
		for tc in str:
			if tc == '0':
				x += 1
		if 2 * x != n:
			print('1\n%s' % str)
		else:
			print('2')
			print(str[0], end=' ')
			for i in range(1, n):
				print(str[i], end='')
			print()
	except:
		break


n = int(input())
st = input()
cou1 = 0
cou2 = 0
for i in range(len(st)):
	if st[i] == '0':
		cou1 += 1
	else:
		cou2 += 1
fl = 0
if cou1 != cou2:
	print(1)
	print(st)
else:
	print(2)
	print(st[:n - 1], end=' ')
	print(st[n - 1:])


from collections import Counter
n = int(input())
s = input()
a = Counter(s)
b = a.get('0', 0) - a.get('1', 0)
if b != 0:
	print(1)
	print(s)
else:
	print(2)
	print(s[:1], s[1:])


n = int(input())
strink = input()
if n % 2 == 1:
	print(1)
	print(strink)
else:
	counter = 0
	for char in strink:
		if char == '1':
			counter += 1
	if counter == n // 2:
		print(2)
		print(strink[:1], strink[1:])
	else:
		print(1)
		print(strink)


from collections import Counter
x = int(input())
qw = input()
q = Counter(qw)

def find(x, q):
	for i in range(q):
		z = x[:i + 1]
		qw = x[i + 1:]
		z2 = Counter(z)
		qw2 = Counter(qw)
		if z2['1'] != z2['0'] and qw2['1'] != qw2['0']:
			return (z, qw)
if q['1'] == q['0']:
	print(2)
	m = find(qw, x)
	print(m[0], m[1])
else:
	print(1)
	print(qw)


n = int(input())
s = input()
if n % 2 == 1:
	print(f'1\n{s}')
else:
	count_map = {}
	for i in range(0, n):
		count_map[s[i]] = 0
	for i in range(0, n):
		count_map[s[i]] += 1
	if count_map.get('0') != count_map.get('1'):
		print(f'1\n{s}')
	else:
		print(f'2\n{s[:1]} {s[1:]}')


n = int(input())
string = input()
z = o = 0
for i in string:
	if i == '1':
		o += 1
	else:
		z += 1
d = n // 2
if o == z:
	if d % 2:
		print(2)
		print(string[:n // 2], string[n // 2:])
	else:
		print(2)
		print(string[:n // 2 + 1], string[n // 2 + 1:])
else:
	print(1)
	print(string)


n = int(input())
k = input()
s = [int(x) for x in list(k)]
a = s.count(0)
b = s.count(1)
if a == b:
	print(2)
	print(k[0], k[1:])
else:
	print(1)
	print(k)


n = int(input())
sr = input()
if sr.count('0') != sr.count('1'):
	print(1)
	print(sr)
else:
	print(2)
	print(sr[:n - 1], sr[n - 1])


import sys
from collections import Counter
import itertools
from math import floor, ceil

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

def dinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rt(x1, x2, y3):
	print(0.5 * (x2 + x1))

def main():
	n = int(input())
	r = input()
	t = r.count('0')
	if t == n - t:
		print(2)
		print(r[:-1], r[-1])
	else:
		print(1)
		print(r)
main()


n = int(input())
s = input()
cz = s.count('0')
co = s.count('1')
if n % 2 == 1 or cz != co:
	print(1)
	print(s)
elif s[:n // 2].count('0') == s[:n // 2].count('1') or s[n // 2:].count('0') == s[n // 2:].count('1'):
	print(2)
	print(s[:n // 2 + 1], ' ', s[n // 2 + 1:])
else:
	print(2)
	print(s[:n // 2], ' ', s[n // 2:])


N = int(input())
A = [int(a) for a in input()]
c0 = A.count(0)
c1 = A.count(1)
if c0 != c1:
	print(1)
	print(''.join([str(a) for a in A]))
else:
	for i in range(1, N):
		left = A[:i]
		right = A[i:]
		if left.count(0) != left.count(1) and right.count(0) != right.count(1):
			break
	print(2)
	print(''.join([str(l) for l in left]), ''.join([str(r) for r in right]))


n = input()
s = input()
stroka = [int(i) for i in s]
for i in range(1, len(s)):
	if stroka[i] == 0:
		stroka[i] = stroka[i - 1]
	else:
		stroka[i] = stroka[i - 1] + 1
if stroka[len(stroka) - 1] != len(stroka) / 2:
	print(str(1) + '\n' + s)
else:
	print(str(2) + '\n' + s[:len(s) - 1] + ' ' + s[len(s) - 1])


n = input()
n = int(n)
s = input()
a = []
b = []
fg1 = 0
fg2 = 0
temp1 = 0
temp2 = 0
for i in range(n):
	if s[i] == '0':
		temp1 = i
		a.append(temp1)
	if s[i] == '1':
		temp2 = i
		b.append(temp2)
if len(a) != len(b):
	print(1)
	print(s)
else:
	r = s[0:n - 1]
	w = s[n - 1:n]
	print(2)
	print(r, w)


n = int(input())
l = list(input())
r = l.count('0')
p = l.count('1')
d = []
v = []
for i in range(len(l)):
	if r == p:
		if l[0] == '0':
			d.append('0')
			l.pop(0)
			r -= 1
		else:
			d.append('1')
			l.pop(0)
			p -= 1
	else:
		break
r = ''.join(l)
if len(d) >= 1:
	d = ''.join(d)
	print(2)
	print(d, r)
else:
	print(1)
	print(r)


import sys
input = sys.stdin.readline

def getN():
	return int(input())

def getList():
	return list(map(int, input().split()))
from sys import exit
from collections import Counter
n = getN()
s = input().strip()
c = Counter(s)
if len(c) == 1:
	print(1)
	print(s)
	exit()
if c['0'] != c['1']:
	print(1)
	print(s)
	exit()
else:
	print(2)
	print(s[0], s[1:])


n = input()
string = input()
chars = list(string)
count = 1
if chars.count('0') == chars.count('1'):
	count += 1
	print(count)
	print(''.join(chars[:-1]), chars[-1])
else:
	print(count)
	print(string)


n = int(input())
zeros = ones = 0
string = input()
for i in string:
	if i == '0':
		zeros += 1
	else:
		ones += 1
if ones == zeros:
	print(2)
	print(string[0], string[1:])
else:
	print(1)
	print(string)


n = int(input().strip())
s = [int(x) for x in input().strip()]
if sum(s) != n / 2:
	print(1)
	print(''.join([str(x) for x in s]))
else:
	print(2)
	print(s[0], ''.join([str(x) for x in s[1:]]))


import copy
n = int(input())
num = list(map(int, list(input())))
if n == 1:
	print(1)
	print(num[0])
else:
	kee = list()
	for i in range(n):
		kee.append(list())
		tmp = list()
		zero = 0
		one = 0
		for j in range(i, n):
			tmp.append(num[j])
			if num[j] == 0:
				zero += 1
			else:
				one += 1
			if zero != one:
				kee[i].append(copy.deepcopy(tmp))
	stk = list()
	for i in range(len(kee[0])):
		stk.append([1, [[0, i]], len(kee[0][i])])
	res = list()
	mindepth = 987654321
	while True:
		if len(stk) == 0:
			break
		pick = stk.pop()
		depth = pick[0]
		curr = copy.deepcopy(pick[1])
		size = pick[2]
		if size == n:
			if mindepth > depth:
				res = curr
				mindepth = depth
		if depth < mindepth and size < n:
			for i in range(len(kee[size])):
				if size + len(kee[size][i]) < n:
					stk.append([depth + 1, curr + [[size, i]], size + len(kee[size][i])])
				elif size + len(kee[size][i]) == n:
					if mindepth > depth:
						res = curr + [[size, i]]
						mindepth = depth + 1
	print(mindepth)
	for itm in res:
		for ch in kee[itm[0]][itm[1]]:
			print(ch, end='')
		print(end=' ')


from collections import Counter as C
n = int(input())
s = input()
c = C(s)
if c['1'] == c['0']:
	print(2)
	print(s[:n - 1], s[-1])
else:
	print(1)
	print(s)


n = int(input())
l = list(input())
n1 = l.count('1')
n0 = l.count('0')
if n1 != n0:
	print(1)
	print(*l, sep='')
else:
	print(2)
	n0 = l[0]
	l.pop(0)
	lp = ''
	for i in l:
		lp += i
	print(n0, lp)


n = int(input())
a = input().rstrip()
zeroes = 0
ones = 0
for c in a:
	if c == '0':
		zeroes += 1
	else:
		ones += 1
if zeroes != ones:
	print(1)
	print(a)
else:
	print(2)
	print(f'{a[0]} {a[1:n]}')


stringlen = int(input())
string = str(input())
if len(string) % 2 == 1 or len(string.split('0')) != len(string.split('1')):
	print('1')
	print(string)
else:
	print('2')
	print(string[0] + ' ' + string[1:])


n = int(input())
s = input()
c0 = s.count('0')
c1 = s.count('1')
l = list(s)
if c1 == c0:
	print(2)
	print(l[0], end=' ')
	print(s[1:])
else:
	print(1)
	print(s)


def do(n, s):
	(x, y) = (0, 0)
	for i in s:
		if i == '1':
			y += 1
		else:
			x += 1
	if x != y:
		print(1)
		print(s)
		return
	(a, b) = (0, 0)
	for i in range(n):
		if a != b and x - a != y - b:
			print(2)
			print(s[:i] + ' ' + s[i:])
			break
		elif s[i] == '0':
			a += 1
		else:
			b += 1
n = int(input())
s = input()
do(n, s)


import sys
from itertools import groupby, product
from collections import Counter
lines = []
for Line in sys.stdin:
	lines.append(Line.rstrip('\n'))
n = list(map(int, lines[0].split()))
del lines[0]
s = lines[0]
t = Counter(s)
if t['0'] != t['1']:
	print('1')
	print(s)
else:
	print('2')
	print(s[:-1], s[-1])


n = int(input())
l = [i for i in input()]
a = l.count('1')
b = l.count('0')
if len(l) % 2 == 1 or a != b:
	print(1)
	print(''.join(l))
else:
	print(2)
	print(l[0], ''.join(l[1:]))


print((lambda _, s: f'1\n{s}' if s.count('0') != s.count('1') else f'2\n{s[0]} {s[1:]}')(input(), input()))


n = int(input())
t = input()
if n == 1:
	print(1)
	print(t)
elif n % 2 == 0:
	r1 = t.count('1')
	r2 = t.count('0')
	if r1 != r2:
		print(1)
		print(t)
	else:
		print(2)
		print(t[:n - 1], t[n - 1])
elif n % 2 == 1:
	print(1)
	print(t)