n=int(eval(input()))

s=list(eval(input()))

ans=[]

latest=0

for i in range(n):

    if s[i]!=latest:

        ans.append(s[i])

        latest=s[i]

print((len(ans)))

n=int(eval(input()))

s=list(eval(input()))



latest=0

L=[]

for i in range(n):

      if s[i]!=latest:

            L.append(s[i])

            latest=s[i]

print((len(L)))
n = int(eval(input()))
s = list(eval(input()))
ans = []
latest = 0
for i in range(n):
    if s[i] != latest:
        ans.append(s[i])
        latest = s[i]
print((len(ans)))

n = int(eval(input()))
s = list(eval(input()))
latest = 0
L = []
for i in range(n):
    if s[i] != latest:
        L.append(s[i])
        latest = s[i]
print((len(L)))

-ans = [] +L = [] -        ans.append(s[i]) +        L.append(s[i]) -print((len(ans))) +print((len(L)))