Harryxun/stf_run huggingface dataset:
Q = 998244353
# def modpower(a,b,Q):#a^b mod Q
#     if b == 0:
#         return 1
#     if b%2 == 0:
#         d = modpower(a,b//2,Q)
#         return d*d%Q
#     if b%2 == 1:
#         return (a*modpower(a,b-1,Q))%Q
# def factorials(n,Q):#n以下の階乗のリストと階乗の逆元のmodQでのリスト
#     F = [1]*(n+1)
#     R = [1]*(n+1)
#     for i in range(n):
#         F[i+1] = F[i]*(i+1)%Q
#         R[i+1] = R[i]*pow(i+1,Q-2,Q)
#     return F, R
def getInv(N):
    inv = [0] * (N + 1)
    inv[0] = 1
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q%i]) % Q
    return inv

N, A, B, K = map( int, input().split())
ans = 0
invs = getInv(N)
nCk = [1]*(N+1)
for i in range(1,N+1):
    nCk[i] = (nCk[i-1]*(N-i+1)*invs[i])%Q
for i in range( min(K//A, N)+1):
    if (K-A*i)%B == 0:
        j = (K-A*i)//B
        ans = (ans + nCk[i]*nCk[j])%Q
print(ans)

### FIXED CODE ###

Q = 998244353
def getInv(N):
    inv = [0] * (N + 1)
    inv[0] = 1
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q%i]) % Q
    return inv

N, A, B, K = map( int, input().split())
ans = 0
invs = getInv(N)
nCk = [1]*(N+1)
for i in range(1,N+1):
    nCk[i] = (nCk[i-1]*(N-i+1)*invs[i])%Q
for i in range(N+1):
    j = (K-A*i)//B
    if A*i + B*j == K and j <= N and 0 <= j:
        j = (K-A*i)//B
        ans = (ans + nCk[i]*nCk[j])%Q
print(ans)
s = input()
d = ['SUN','MON','TUE','WED','THU','FRI','SAT','a']  
print(d.index(s)[::-1])

### FIXED CODE ###

s = input()
d = ['SUN','MON','TUE','WED','THU','FRI','SAT','a']  
d.reverse()
print(d.index(s))
li,lia = [],[]
total = 0
for i in range(5):
    a = input()
    li.append(a)
for i in range(5):
    lia.append(li[i][-1])
lib = [int(s) for s in lia]
b = lib.count(0)
for i in range(b):
    lib.remove(0)
for i in range(5):
    total += (int(li[i])//10+1)*10
total -= 10*(1+b)
total += min(lib)
print(total)

### FIXED CODE ###

li,lia = [],[]
total = 0
for i in range(5):
    a = input()
    li.append(a)
for i in range(5):
    lia.append(li[i][-1])
lib = [int(s) for s in lia]
b = lib.count(0)
for i in range(b):
    lib.remove(0)
for i in range(5):
    total += (int(li[i])//10+1)*10
if len(lib) >= 1:
    total -= 10*(1+b)
else:
    total -= 10*(b)
if len(lib) >= 1:
    total += min(lib)
if total <= 0:
    print(0)
else:
    print(total)
s = input()
     
    w1 = [ "R", "U", "D"]
    w2 = [ "L", "U", "D"]
     
    for i in range(len(s)):
      if i % 2 == 0:
        if not s[i] in w1 :
          print("No")
          exit()
      else :
        if not s[i] in w2 :
          print("No")
          exit()
    print("Yes")

### FIXED CODE ###

s = input()

w1 = [ "R", "U", "D"]
w2 = [ "L", "U", "D"]

for i in range(len(s)):
  if i % 2 == 0:
    if not s[i] in w1 :
      print("No")
      exit()
  else :
    if not s[i] in w2 :
      print("No")
      exit()
print("Yes")
import math
H, A = map(int, input().split())
print(math.ceil(H,A))


### FIXED CODE ###

import math
H, A = map(int, input().split())
print(math.ceil(H/A))
s=[chr(i) for i in range(97,122)]
c=raw_input()
ans= s.index(c)
print s[ans+1]

### FIXED CODE ###

s=[chr(i) for i in range(97,123)]
c=raw_input()
ans= s.index(c)
print s[ans+1]
n,k=int(input())
list=list(map(int,input().split()))
list.sort()
ans=0
for i in range(k):
  ans+=list[i]
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
list=list(map(int,input().split()))
list.sort()
ans=0
for i in range(k):
  ans+=list[i]
print(ans)
import sys
ans = 1
count = 1
while ans:
  ans = int(sys.stdin.readline())
  if ans:
    print "Case %d: %d"(count, ans)
    count += 1

### FIXED CODE ###

import sys
ans = 1
count = 1
while ans:
  ans = int(sys.stdin.readline())
  if ans:
    print "Case %d: %d"%(count, ans)
    count += 1
print("Yes") if list(input().split())[3] == list(input().split())[4] else print("No")

### FIXED CODE ###

coffee = input()
print("Yes") if coffee[2] == coffee[3] and coffee[4] == coffee[5] else print("No")
def merge(A, left, mid, right):
    global count
    n1 = mid - left
    n2 = right - mid
    banpei = 10 ** 9 + 1
    L, R = L + [banpei], R + [banpei]
    L = [A[left + i] for i in range(n1)]
    R = [A[mid + i] for i in range(n2)]

    i, j = 0, 0
    for k in range(left, right):
        if L[i] <= R[j]:
            A[k] = L[i]
            i += 1
        else:
            A[k] = R[j]
            j += 1
    count += right - left


def merge_Sort(A, left, right):
    if 1 < right - left:
        mid = int((left + right) / 2)
        merge_Sort(A, left, mid)
        merge_Sort(A, mid, right)
        merge(A, left, mid, right)

n = int(input())
A = list(map(int, input().split()))
count = 0
merge_Sort(A, 0, n)
print(' '.join(map(str, A)))
print(count)

### FIXED CODE ###

def merge(A, left, mid, right):
    global count
    banpei = 1000000001
    L = A[left:mid] + [banpei]
    R = A[mid:right] + [banpei]

    i, j = 0, 0
    for k in range(left, right):
        if L[i] <= R[j]:
            A[k] = L[i]
            i += 1
        else:
            A[k] = R[j]
            j += 1
    count += right - left


def merge_Sort(A, left, right):
    if 1 < right - left:
        mid = (left + right) // 2
        merge_Sort(A, left, mid)
        merge_Sort(A, mid, right)
        merge(A, left, mid, right)

n = int(input())
A = list(map(int, input().split()))
count = 0
merge_Sort(A, 0, n)
print(*A)
print(count)
from math import gcd
A,B,C,D=map(int,input().split())
A-=1
S=B-B//C-B//D+B//((C*D)//gcd(C,D))
T=A-A//C-A//D+A//((C*D)//gcd(C,D))
print(S-T)

### FIXED CODE ###

from fractions import gcd
A,B,C,D=map(int,input().split())
A-=1
S=B-B//C-B//D+B//((C*D)//gcd(C,D))
T=A-A//C-A//D+A//((C*D)//gcd(C,D))
print(S-T)
from scipy.special import comb

N = int(input())
S = list(''.join(sorted(str(input()))) for _ in range(N))
unique_S = list(set(S))

ans = 0
for s in unique_S:
    n = S.count(s)
    if n > 1:
        ans += comb(n, 2, exact=True)
print(ans)


### FIXED CODE ###

N = int(input())
S = list(''.join(sorted(str(input()))) for _ in range(N))

dic = {}
ans = 0

for s in S:
    if not s in dic:
        dic[s] = 1
    else:
        ans += dic[s]
        dic[s] += 1
print(ans)
N = input()

if N%2==0:
  print(N/2)
else:
  print((N+1)/2)

### FIXED CODE ###

n = int(input())

ans = n//2 +n%2

print(ans)
k = int(input())
i = int(str(k)[-1])
if(i % 2 == 0 | i % 5 == 0 ):
    print(-1)
else:
    numl = [0]*k
    num = 7
    for i in range(k):
        numl[i] = num
        num = 7+ num*10
        
    for i in range(k):
        if(numl[i] % k == 0):
            break
        else:
            result=i+1
    else:
        result = -1
    print(result)

### FIXED CODE ###

k = int(input())
i = int(str(k)[-1])
if(i % 2 == 0 | i % 5 == 0 ):
    print(-1)
else:
    num = 7
    result=1
    for i in range(k):
        if(num % k == 0):
            break
        else:
            num = (7+ num*10)%k
            result+=1
    else:
        result = -1
    print(result)
A, B, C, D = (int(x) for x in input().split())
if A + B > C + D:
  print('Right')
else:
  if A + B < C + D:
    print('Left')
  else:
    print('Balanced)


### FIXED CODE ###

A, B, C, D = (int(x) for x in input().split())
if A + B < C + D:
  print('Right')
if A + B > C + D:
  print('Left')
if A + B == C + D:
  print('Balanced')
# coding:utf-8


def main():
    A, B, K = map(int, input().split())
    ans = []
    ans.append(1)
    for i in range(2, max(A, B)):
        if A % i == 0 and B % i == 0:
            ans.append(i)
        # if len(ans) >= K:
        #     break
    # print(ans)
    print(ans[-K])


if __name__ == "__main__":
    main()


### FIXED CODE ###

# coding:utf-8


def main():
    A, B, K = map(int, input().split())
    ans = []
    ans.append(1)
    for i in range(2, max(A, B)+1):
        if A % i == 0 and B % i == 0:
            ans.append(i)
        # if len(ans) >= K:
        #     break
    # print(ans)
    print(ans[-K])


if __name__ == "__main__":
    main()
h,n = map(int,input().split())
a = input().split()
a.sort()

sum = int(a[-1]) + int(a[-2])

result = h - sum
if result <= 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

h,n = map(int,input().split())
a = list(map(int,input().split()))
goukei = sum(a)
result = h - goukei

if result <= 0:
    print("Yes")
else:
    print("No")
N = int(input())
divisors=[]
for i in range(1,int((N**0.5))+1):
    if N%i == 0:
        divisors.append(i)
        if i != N//i:
            divisors.append(N//i)
divisors_sorted = sorted(divisors)
print(len(str(divisors_sorted[int((len(divisors_sorted)+1)/2)])))

### FIXED CODE ###

N = int(input())
ans=[]
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        ans.append(max(len(str(i)),len(str(N//i))))
print(min(ans))
K=int(input())
if K%2==0:
  print((K/2)^2)
else:
  print(((K+1)/2)*((K-1)/2))

### FIXED CODE ###

K=int(input())
if K%2==0:
  print(int((K/2)*(K/2)))
else:
  print(int(((K+1)/2)*((K-1)/2)))
s = input()

c = 0
m = 0
for i in s:
	if s in 'ACGT':
		c += 1
		m = max(c,m)
    else:
		c = 0

print(m)

### FIXED CODE ###

s = input()

c = 0
m = 0
for i in s:
	if i in 'ACGT':
		c += 1
		m = max(c,m)
	else:
		c = 0

print(m)
input()

a = list(map(int, input().split()))

s = 0

for i in len(a):
    s += i

print(min(a), max(a), s)


### FIXED CODE ###

input()

a = list(map(int, input().split()))

s = 0

for i in a:
    s = s + i

print(min(a), max(a), s)
n,k = map(int,input().split())
num_list = list(map(int , input().split()))
candidate = 0
for i in range(n-k):
    if i == 0:
        for j in range(k):
            candidate += (num_list[j]+1)/2
        tmp = candidate
    else:
        tmp += -(num_list[i-1]+1)/2 + (num_list[i+k]+1)/2
        if tmp > candidate:
            candidate = tmp
        
print(candidate)

### FIXED CODE ###

s,t = input().split()
num_s,num_t =map(int,input().split())
u = input()
if u == s:
    num_s -= 1
else:
    num_t -= 1
print('{0} {1}'.format(num_s , num_t))
N = int(input())
sum = 0
f = 0
for k in range(1,N):
  for j in range(1,k):
  	if k % j == 0：
    	sum += k
print(f)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1, n + 1):
    y = n // i
    ans += y * (y + 1) * i // 2
print(ans)
import math

a, b = map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import  fractions

a, b = map(int, input().split())

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(a, b))
a, b, k = (int(i) for i in input().split())
l = list(range(a,b+1))
for i in sorted(set(l[:k]) | set(l[-k:])):
    print(i)

### FIXED CODE ###

a, b, k = (int(i) for i in input().split())
l = [i for i in range(a,b+1)] if b - a < 110 else [i for i in range(a,a+110)] + [i for i in range(b-110,b+1)]
for i in sorted(set(l[:k]) | set(l[-k:])):
    print(i)
A={str(n+1):a for n,a in zip(range(int(input())),input().split())}
print(" ".join(sorted(A.items(),key=lambda x:x[1])[i][0] for i in len(A)))

### FIXED CODE ###

A=dict(zip(range(1,int(input())+1),list(map(int,input().split()))))
B=sorted(A.items(),key=lambda x:x[1])
for b in B:
    print(b[0],end=" ")
W, H, N = [int(_) for _ in input().split()]
xya = [[int(_) for _ in input().split()] for i in range(N)]

d = [[0], [W], [0], [H]]

for x, y, a in xya:
    if a == 1 or a == 2:
        d[a-1] += [x]
    else:
        d[a-1] += [y]

if (max(d[0]) - min(d[1])) > 0 and (max(d[2]) - min(d[3]) > 0:
    ret = (max(d[0]) - min(d[1])) * (max(d[2]) - min(d[3]))
    print(max(ret, 0))
else:
    print(0)

### FIXED CODE ###

W, H, N = [int(_) for _ in input().split()]
xya = [[int(_) for _ in input().split()] for i in range(N)]

d = [[0], [W], [0], [H]]

for x, y, a in xya:
    if a == 1 or a == 2:
        d[a-1] += [x]
    else:
        d[a-1] += [y]

if min(d[1]) - max(d[0]) > 0 and min(d[3]) - max(d[2]) > 0:
    ret = (min(d[1]) - max(d[0])) * ( min(d[3]) - max(d[2]))
    print(max(ret, 0))
else:
    print(0)
n, k = map(int, input().split())
L = list(map(int, input().split()))
L = L.sorted(reverse=True)
sum = 0

for i in L:
  sum += L[i]

### FIXED CODE ###

N, K = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse=True)
ans = []

for i in range(K):
    ans.append(l[i])
    
print(sum(ans))
import numpy as np
flag = False

N = int(input())
H = list(map(int, input().split()))
H = np.array(H)
D = (H[1:]-H[:-1])

for i in range(len(H[1:]-H[:-1])):
    if D[i] < -1:
        flag = True
        break
    elif D[i] == -1:
        if D[i-1] == -1:
            flag = True
            break
        elif D[i+1] == -1:
            flag = True
            break

if flag == True:
    print('No')
else:
    print('Yes')


### FIXED CODE ###

import sys

n = int(input())
h = list(map(int, input().split()))

for i in range(n-1):
    d = h[i+1] - h[i]
    if d >= 1:
        h[i+1] -= 1
    elif d < 0:
        print('No')
        sys.exit()
print('Yes')
def main():
    n = int(input())
    a = list(map(int, input().split()))
    dp = [[-10**15]*(3) for i in range(n+1)]
    dp[2][0] = a[0]
    dp[2][1] = a[1]
    dp[2][2] = max(a[0], a[1])
    dp[3][0] = max(a[0]+a[1], a[0]+a[2], a[1]+a[2])
    for i in range(4, n+1):
        if i%2:
            dp[i][0] = max(dp[i-1][2], dp[i-2][0]+a[i-1])
        else:
            dp[i][0] = dp[i-2][0]+a[i-2]
            dp[i][1] = dp[i-2][1]+a[i-1]
            dp[i][2] = max(dp[i][0], dp[i][1])
    if n%2:
        print(dp[n][0])
    else:
        print(dp[n][2])

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n = int(input())
    a = list(map(int, input().split()))
    dp = [-10**15]*(n+1)
    dp[2] = max(a[0], a[1])
    if n > 2:
        dp[3] = max(a[:3])
        aa = a[0]+a[2]
        for i in range(4, n+1):
            if i%2:
                aa += a[i-1]
                dp[i] = max(dp[i-1], dp[i-2]+a[i-1])
            else:
                dp[i] = max(aa, dp[i-2]+a[i-1])
    print(dp[n])

if __name__ == "__main__":
    main()
IN = iter(Input.split('\n')).__next__
def input():
    return IN()

# 入力
N, W = map(int, input().split())
w, v = [], []
for _ in range(N):
    w_, v_ = map(int, input().split())
    w.append(w_)
    v.append(v_)
V = sum(v)
dp = [[float("INF")]*(V+1) for _ in range(N+1)]
dp[0][0] = 0
for i in range(N):
    for j in range(V+1):
        if j >= v[i]: dp[i+1][j] = dp[i][j-v[i]]+w[i]
        else: dp[i+1][j] = dp[i][j]
ans = 0
for i in range(V+1):
    if dp[N][i]<=W: ans=i
print(ans)

### FIXED CODE ###

N, W = map(int, input().split())
w, v = [], []
for _ in range(N):
    w_, v_ = map(int, input().split())
    w.append(w_)
    v.append(v_)
V = sum(v)
dp = [[float("INF")]*(V+1) for _ in range(N+1)]
dp[0][0] = 0
for i in range(N):
    for j in range(V+1):
        if j >= v[i]: dp[i+1][j] = min(dp[i][j] ,dp[i][j-v[i]]+w[i])
        else: dp[i+1][j] = dp[i][j]
ans = 0
for i in range(V+1):
    if dp[N][i]<=W: ans=i
print(ans)
A, B, N = map(int, input().split())

def floor(x):
    out = (A * x)//B - A * (x//B)
    return out

max = 0
#for i in range(N//2, N + 1):
    #if(floor(i) > max):
        #max = floor(i)
max = max(floor(N), floor(B-1))

print(max)



### FIXED CODE ###

A, B, N = map(int, input().split())

def floor(x):
    out = (A * x)//B - A * (x//B)
    return out

max = 0
#for i in range(N//2, N + 1):
    #if(floor(i) > max):
        #max = floor(i)

if(N < (B-1)):
    max = floor(N)
else:
    max = floor(B-1)

print(max)
n = int(input())
A = [int(x)%(1e9+7) for x in input().split()]

# calculating array sum (a1 + a2 ... + an) 
array_sum = 0
for i in range(0, n, 1): 
    array_sum = (array_sum + A[i])%(1e9+7)

    # calcualting square of array sum 
    # (a1 + a2 + ... + an)^2 
    array_sum_square = (array_sum * array_sum)%(1e9+7)

# calcualting a1^2 + a2^2 + ... + an^2 
individual_square_sum = 0
for i in range(0, n, 1): 
    individual_square_sum += (A[i] * A[i])%(1e9+7)
    individual_square_sum = individual_square_sum%(1e9+7)

# required sum is (array_sum_square - individual_square_sum) / 2 
print (array_sum_square - individual_square_sum) / 2


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
s = sum(a)
ans = 0
mod = 10**9+7
 
for i in range(n-1):
    s -= a[i]
    ans += a[i]*s
 
print(ans%mod)
a = input()
2 print('A' if a.islower() else 'a')

### FIXED CODE ###

alpha = input()
if alpha.islower():
    print('a')
else:
    print('A')
n,m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
ab = sorted(ab, key = lambda x:x[1], reverse = True)
ab = sorted(ab)

def find_seed(ab, t):
	if len(ab) == 0:
		return 1
	if t[0] <= ab[0][0] < t[1]:
		t = [ab[0][0], min([ab[0][1],t[1]])]
		ab.pop(0)
		return find_seed(ab,t)

	return 1

ans = 0

while len(ab) > 0:
	t = ab.pop(0)
	ans += find_seed(ab,t)

print(ans)

### FIXED CODE ###

N, M = map(int,input().split())
E = sorted([list(map(int, input().split())) for _ in range(M)])

c = E[0]
cnt = 0
for i in range(1,M):
	if c[0] <= E[i][0] < c[1]:
		c = [max(c[0],E[i][0]), min(c[1],E[i][1])]
	else:
		cnt += 1
		c = E[i]

print(cnt+1)
class Node:
        def __init__(self, index):
            self.count = 0
            self.fr = -1
            self.index = index
     
     
    N, Q = map(int, input().split())
    node = [Node(i) for i in range(N)]
    for i in range(N - 1):
        fr, to = map(int, input().split())
        node[to - 1].fr = fr - 1
     
    for i in range(Q):
        fr, c = map(int, input().split())
        node[fr- 1].count += c
     
    for i in range(N):
        x = node[i].count
        next = node[i].fr
        while next != -1:
            x += node[next].count
            next = node[next].fr
        if not i == N:
            print(x, end=' ')
        else:
            print(x)

### FIXED CODE ###

class Node:
    def __init__(self, index):
        self.count = 0
        self.fr = -1
        self.index = index


N, Q = map(int, input().split())
node = [Node(i) for i in range(N)]
for i in range(N - 1):
    fr, to = map(int, input().split())
    node[to - 1].fr = fr - 1

for i in range(Q):
    fr, c = map(int, input().split())
    node[fr - 1].count += c

print(node[0].count, end=' ')

for i in range(1, N):
    node[i].count += node[node[i].fr].count
    if not i == N:
        print(node[i].count, end=' ')
    else:
        print(node[i].count)
[n,m]=[int(i) for i in input().split()]
a=[]
b=""
c=[]
d=""
e=1
#a箱,c箱にそれぞれの画像を用意
for i in range(n):
    b=b+str(input().split())
a.append(b)
for i in range(m):
    d=d+str(input().split())
c.append(d)
print(c)
print(d)
#照合
for i in range(n):
    for j in range(m):
        f=c[j].find(a[i])
        if f!=-1:
            for k in range(m):
                e=e*(a[f:f+m]!=c[f:f+m])
if e==0:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

[n,m] = [int(i) for i in input().split()]
a = []
b = []
for i in range(n):
    a.append(input())
for i in range(m):
    b.append(input())
cnt = 0
flag = "No"
for i in range(n - m + 1):
    for j in range(n - m + 1):
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] == b[k][l]:
                    cnt += 1

        if cnt == m ** 2:
            flag = "Yes"
        else:
            cnt = 0
print(flag)
a,b,c = map(int, input().split())

if a < b < c:
print("Yes")
else:
print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())

if a < b < c:
    print("Yes")
else:
    print("No")
n, m = (int(_) for _ in input().split())  
x = [int(input()) for i in range(m)]
xi = 0

a = [1,1]
if x[xi] == 1:
    xi += 1
    a[1] = 0

for i in range(n-1):
    if x[xi]-2 == i:
        a.append(0)
        xi = min(len(x)-1,xi+1)
    else:
        a.append(a[i+1]+a[i])

print(a[n]%1000000007)

### FIXED CODE ###

n, m = (int(_) for _ in input().split())
x = [int(input()) for i in range(m)]
xi = 0

if m == 0:
    x = [999999]

a = [1,1]
if x[xi] == 1:
    xi = min(len(x)-1,xi+1)
    a[1] = 0

for i in range(n-1):
    if x[xi]-2 == i:
        a.append(0)
        xi = min(len(x)-1,xi+1)
    else:
        a.append(a[i+1]+a[i])

print(a[n]%1000000007)
# ANSHUL GAUTAM
# IIIT-D

from math import *

'''

'''

a,b = map(int, input().split())
print(0)


### FIXED CODE ###

# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

N = int(stdin.readline())
s,t = list(map(str, stdin.readline().rstrip().split()))
ans = ''
for i in range(N):
	ans += s[i] + t[i]
print(ans)
s=int(input)
def c(x):
  co=0
  for i in range(1,9):
    if x%i==0 and x//i<=9:
      co+=1
  if co>0:
    return("Yes")
  else:
    return("No")
print(c(s))

### FIXED CODE ###

N = int(input())
mylist = []
for i in range(1,10):
    for j in range(1,10):
        mylist.append(i*j)
if mylist.count(N):
    print("Yes")
else:
    print("No")
S = input()
c = 0
d = ""
runlength = []
for i in range(len(S)):
    if d == "":
        d = S[i]
        c += 1
    if d == S[i]:
        c += 1
    else:
        runlength.append([d,c])
        d = ""
        c = 0
ans = [0]*len(S)
ind = -1
for rl in runlength:
    if rl[0] == "R":
        ind += rl[1]
        ans[ind] += rl[1] - rl[1]//2
        ans[ind+1] += rl[1]//2
    else:
        ans[ind] += rl[1]//2
        ans[ind+1] += rl[1] - rl[1]//2
        ind += rl[1]
print(*ans)

### FIXED CODE ###

S = input()
def runlength(str):
    res = []
    data,count = str[0],1
    for i in range(1,len(str)):
        if str[i] == data:
            count += 1
        else:
            res.append((data,count))
            data,count = str[i],1
    res.append((data,count))
    return res
ans = [0]*len(S)
ind = -1
for rl in runlength(S):
    if rl[0] == "R":
        ind += rl[1]
        ans[ind] += rl[1] - rl[1]//2
        ans[ind+1] += rl[1]//2
    else:
        ans[ind] += rl[1]//2
        ans[ind+1] += rl[1] - rl[1]//2
        ind += rl[1]
print(*ans)