Let's call (yet again) a string good if its length is even, and every character in odd position of this string is different from the next character (the first character is different from the second, the third is different from the fourth, and so on). For example, the strings good, string and xyyx are good strings, and the strings bad, aa and aabc are not good. Note that the empty string is considered good.

You are given a string $s$, you have to delete minimum number of characters from this string so that it becomes good.


-----Input-----

The first line contains one integer $n$ ($1 \le n \le 2 \cdot 10^5$) — the number of characters in $s$.

The second line contains the string $s$, consisting of exactly $n$ lowercase Latin letters.


-----Output-----

In the first line, print one integer $k$ ($0 \le k \le n$) — the minimum number of characters you have to delete from $s$ to make it good.

In the second line, print the resulting string $s$. If it is empty, you may leave the second line blank, or not print it at all.


-----Examples-----
Input
4
good

Output
0
good

Input
4
aabc

Output
2
ab

Input
3
aaa

Output
3

Difficulty: introductory

Starter code:

Solutions:
n = int(input())
s = input()
t = ''
lst = '1'
for i in s:
	if lst == '1':
		lst = i
		nw = ''
	else:
		if lst != i:
			t += lst
			t += i
			lst = '1'
print (len(s) - len(t))
print (t)

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

a = ''
for i in range(n):
    if len(a) < 2 or a[-2:] != s[i] * 2:
        a += s[i]

b = ''
for i in range(len(a)):
    if len(b) & 1:
        if a[i] != b[-1]:
            b += a[i]
    else:
        b += a[i]

if len(b) & 1:
    b = b[:-1]
print(n - len(b))
print(b)


n = int(input())
s = input() + "K"
count = 0
ans = []
i = 0
while i < n:
    if s[i] == s[i + 1]:
        count += 1
        i += 1
    else:
        ans.append(s[i])
        ans.append(s[i + 1])
        i += 2
if ans[-1] == "K":
    ans.pop()
    ans.pop()
    count += 1
print(count)
print("".join(ans))


n=int(input())
a=input()
s=[]
i=1
st=0
while i<n:
    if a[st]!=a[i]:
        s.append(a[st])
        s.append(a[i])
        st=i+1
        i=i+2
    else:
        i+=1
print(n-len(s))
print(''.join(s))


n=int(input())
S=input()

from collections import deque
QUE=deque(S)
ANS=[]

while QUE:
    if len(QUE)==1:
        QUE.pop()
        break
    if QUE[0]==QUE[1]:
        QUE.popleft()
    elif QUE[0]!=QUE[1]:
        x=QUE.popleft()
        y=QUE.popleft()
        ANS.append(x)
        ANS.append(y)

print(n-len(ANS))
print("".join(ANS))
        


n=int(input())
s=input()
l1=[]
for c in s:
    if len(l1)==0:
        l1.append(c)
    else :
        if len(l1)%2==1:
            if l1[-1]==c:
                continue
            else :
                l1.append(c)
        else :
            l1.append(c)
            
if len(l1)%2==0:
    print(n-len(l1))
    print(''.join(l1))
else :
    print(n-len(l1)+1)
    print(''.join(str(l1[i]) for i in range(0,len(l1)-1)))

def main():
    from sys import stdin, stdout

    def read():
        return stdin.readline().rstrip('\n')

    def read_array(sep=None, maxsplit=-1):
        return read().split(sep, maxsplit)

    def read_int():
        return int(read())

    def read_int_array(sep=None, maxsplit=-1):
        return [int(a) for a in read_array(sep, maxsplit)]

    def write(*args, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in args) + end)

    def write_array(array, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in array) + end)

    n = read_int()
    s = read()
    out = []
    for ch in s:
        if not out or out[-1] != ch or len(out) % 2 == 0:
            out.append(ch)
    if len(out) % 2:
        out.pop()
    write(n - len(out))
    write(''.join(out))

main()


n = int(input())
use = [True for i in range(n)]
s = input()
now = 0
flag = 0
for i in range(1, n):
    if flag == 1:
        flag = 0
        continue
    if s[now] == s[i]:
        use[i] = False
    else:
        flag = 1
        now = i+1
ans = ""
for i in range(n):
    if use[i]:
        ans += s[i]
if len(ans) % 2 == 1:
    ans = ans[:-1]

print(n-len(ans))
print(ans)


n = int(input())
A = list(input())
u0 = 0
u1 = 1
ans = []
while u1 < n:
    if A[u0] == A[u1]:
        u1 += 1
    else:
        u0 = u1 + 1
        ans.append(A[u1 - 1])
        ans.append(A[u1])
        u1 += 2
print(n - len(ans))
print(''.join(ans))

n=int(input())
s=input()
ans=''
v=[0]*n
flag=True
for i in range(n-1):
    if flag:
        if s[i]==s[i+1]:
            v[i]=1
        else:
            flag=False
    else:
        flag=not flag
for i in range(n):
    if v[i]==0:
        ans+=s[i]
if len(ans)%2:
    ans=ans[:-1]
print(n-len(ans))
print(ans)

n = int(input())
st = input()
ind = 0
kol = 0
new = ""
i = 0
while i < n:
	new += st[i]
	j = i + 1
	while j < n and st[j] == st[i] and ind % 2 == 0:
		j += 1
		kol += 1
	i = j
	ind += 1
if len(new) % 2 == 1:
	new = new[:-1]
	kol += 1
print(kol)
print(new)


import math
import bisect
import heapq
from collections import defaultdict


def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, x, y = egcd(b % a, a)
        return (g, y - (b // a) * x, x)


def mulinv(b, n):
    g, x, _ = egcd(b, n)
    if g == 1:
        return x % n



def isprime(n):
    for d in range(2, int(math.sqrt(n))+1):
        if n % d == 0:
            return False
    return True


def argsort(ls):
    return sorted(list(range(len(ls))), key=ls.__getitem__)


def f(p=0):
    if p == 1:
        return list(map(int, input().split()))
    elif p == 2:
        return list(map(int, input().split()))
    elif p == 3:
        return list(input())
    else:
        return int(input())

n = f()
s = f(3)
res = []
i = 0
while(i<n-1):
    while(i<n-1 and s[i]==s[i+1]):
        i+=1
    if i==n-1:
        break
    if s[i]!=s[i+1]:
        res.append(s[i])
        res.append(s[i+1])
    else:
        res.append(s[i])
    i+=2

if len(res)%2==0:
    print(n-len(res))
    print(''.join(res))
else:
    print(n-len(res)+1)
    print(''.join(res[:-1]))


n = int(input())
string = input()
ans = string[0]
count = 0
index = []
for q in range(1, n):
    if len(ans) % 2 == 1:
        if ans[-1] != string[q]:
            ans += string[q]
        else:
            count+=1
    else:
        ans+=string[q]

if len(ans)%2!=0:
    print(count + 1)
    print(ans[:-1])
else:
    print(count)
    print(ans)

#codeforces1165C_live
gi = lambda : list(map(int,input().strip().split()))
n, = gi()
s = list(input())
st = []
for e in s:
	if st and st[-1] == e and len(st)%2:
		st.pop()
		st.append(e)
	else:
		st.append(e)
if len(st)%2:
	st.pop()
print(n - len(st))
print("".join(st))

def go():
    n = int(input())
    a = [i for i in input()]
    if n == 1:
        return '1\n'
    i = 1
    while i < n:
        if a[i] == a[i - 1]:
            a[i - 1] = None
            i += 1
        else:
            i += 2
    a = ''.join(i for i in a if i is not None)
    if len(a) % 2 == 1:
        a = a[:-1]
    return '{}\n{}'.format(n - len(a), a)

print(go())


import os
import sys

def log(*args, **kwargs):
    if os.environ.get('CODEFR'):
        print(*args, **kwargs)


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


result = ''
i = 0
while i < n - 1:
    j = i + 1
    while j != n:
        if s[i] != s[j]:
            result += s[i]+s[j]
            i = j + 1
            break
        j += 1
    if j == n:
        break

print(n-len(result))
print(result)
    


def main():
    n = int(input())
    s = input()
    stack = []
    ans = 0
    for i in range(n):
        stack.append((s[i], len(stack)))
        if len(stack) > 1:
            if stack[-2][0] == stack[-1][0] and stack[-2][1] % 2 == 0:
                ans += 1
                stack.pop()
    if len(stack) % 2 == 0:
        print(ans)
        for i in range(len(stack)):
            print(stack[i][0], end='')
    else:
        print(ans + 1)
        for i in range(len(stack) - 1):
            print(stack[i][0], end='')



main()


n = int(input())
s = input()
count = 0
good = ''
i = 0
while i < len(s)-1:
    if s[i] == s[i+1]:
        count += 1
        i += 1
    else:
        good += s[i:i+2]
        i += 2
if i == len(s)-1:
    count += 1
print(count)
print(good)

n=int(input())
s=list(input())
s.append(0)
x=s[0]
tot=''
for i in range(n):
    if s[i]!=x:
        tot+=x+s[i]
        x=s[i+1]
print(n-len(tot))
print(tot)
    


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

res = []

l = 0
r = 1
while r < n:
    if s[l] != s[r]:
        res += [s[l], s[r]]
        l = r + 1
        r = l + 1
    else:
        r += 1

k = n - len(res)

print(k)
print(*res, sep='')


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

res = []

i = 0

ops = 0
while i < n:
    # is bad
    if i + 1 == n or s[i] == s[i + 1]:
        ops += 1
        i += 1
    else:
        res += [s[i], s[i + 1]]
        i += 2

print(ops)
print(''.join(res))

n = int(input())
s = input()
o = 0
rem = set()
for i, c in enumerate(s):
    if (i ^ o) & 1: continue
    if i == n - 1:
        rem.add(i)
        break
    if s[i] == s[i + 1]:
        rem.add(i)
        o ^= 1
res = ''.join(s[i] for i in range(n) if i not in rem)
print(len(rem))
print(res)

n = int(input())
a = input()

ans = 0
x = True
b = []
for i in range(n-1):
	if x:
		if a[i]==a[i+1]:
			b.append(i)#+ans)
			ans+=1
			x = not x
	x = not x

if (n-ans)%2:
	b.append(n-1)
	ans+=1

#print(b)
print(ans)
b = set(b)
for i in range(n):
	if i not in b:
		print(a[i],end='')






n = int(input())
s = input().strip()
prev = s[0]
ans = [s[0]]
k = 0
for i in range(1, n):
    if (k+i) % 2 == 1 and s[i] == prev:
        k += 1
        continue
    else:
        ans.append(s[i])
        prev = s[i]
if len(ans)%2 == 1:
    ans.pop()
print(n - len(ans))
print(''.join(ans))

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


i = 0
j = 1
while j < len(s):
    while j < len(s) and s[i] == s[j]:
        s[j] = ''
        j += 1

    i = j + 1
    j += 2

if (len(s) - s.count('')) % 2 == 1:
    i = n - 1
    while i >= 0 and s[i] == '':
        i -= 1
    s[i] = ''

print(s.count(''))
print(''.join(s))