n = int(eval(input()))

c = eval(input())

cnt_r = c.count("R")

print((c[:cnt_r].count("W")))
n=eval(input())

c=eval(input())

print((c[:c.count("R")].count("W")))
n = int(eval(input()))
c = eval(input())
cnt_r = c.count("R")
print((c[:cnt_r].count("W")))

n = eval(input())
c = eval(input())
print((c[: c.count("R")].count("W")))

-n = int(eval(input())) +n = eval(input()) -cnt_r = c.count("R") -print((c[:cnt_r].count("W"))) +print((c[: c.count("R")].count("W")))