Harryxun/stf_run huggingface dataset:
w, h = 0, 0

def dfs(x, y, data):
    data[x][y] = 0
    for dx in range(-1, 2):
        for dy in range(-1, 2):
            sx, sy = x + dx, y + dy
            if sx < 0 or sx >= h or sy < 0 or sy >= w:
                continue
            if data[sx][sy] > 0:
                data = dfs(sx, sy, data)
    return data

while True:
    w, h = map(int, input().split())
    if w == h == 0:
        break

    data = []
    for i in range(h):
        data.append(list(map(int, input().split())))

    ans = 0
    for x in range(h):
        for y in range(w):
            if data[x][y] > 0:
                ans += 1
                data = dfs(x, y, data)
    print (ans)


### FIXED CODE ###

from queue import Queue
w, h = 0, 0

def bfs(x, y, data):
    que = Queue()
    que.put((x, y))

    while not que.empty():
        x, y = que.get()
        if data[x][y] == 0:
            continue

        data[x][y] = 0
        for dx in range(-1, 2):
            for dy in range(-1, 2):
                sx, sy = x + dx, y + dy
                if sx < 0 or sx >= h or sy < 0 or sy >= w:
                    continue
                que.put((sx, sy))
    return data


while True:
    w, h = map(int, input().split())
    if w == h == 0:
        break

    data = []
    for i in range(h):
        data.append(list(map(int, input().split())))

    ans = 0
    for x in range(h):
        for y in range(w):
            if data[x][y] > 0:
                ans += 1
                data = bfs(x, y, data)
    print (ans)
import sys
n,m = map(int,input().split())
ans = [-1 for i in range(n)]
check = [0 for i in range(n)]
if n == 1:
    s,c = map(int,input().split())
    print(c)
else:
    for i in range(m):
        s,c = map(int,input().split())
        if ans[s-1] == -1:
            ans[s-1] = c
        else:
            if c == ans[s-1]:
                continue
            else:
                print(-1)
                sys.exit()
        if s-1 == 0:
            if c == 0:
                print(-1)
                sys.exit()
    for i in range(1,n):
        if ans[i] == -1:
            ans[i] = 0
    if ans[0] == -1:
        ans[0] = 1
    ans2 = ''
    for i in range(n):
        ans2 += str(ans[i])
    print(ans2)

### FIXED CODE ###

import sys
n,m = map(int,input().split())
ans = [-1 for i in range(n)]
if n == 1:
    if m == 0:
        print(0)
        sys.exit()
    else:
        for i in range(m):
            s,c = map(int,input().split())
            if ans[s-1] == -1:
                ans[s-1] = c
            else:
                if c == ans[s-1]:
                    continue
                else:
                    print(-1)
                    sys.exit()
        print(ans[0])
else:
    for i in range(m):
        s,c = map(int,input().split())
        if s-1 == 0:
            if c == 0:
                print(-1)
                sys.exit()
            else:
                if ans[s-1] == -1:
                    ans[s-1] = c
                else:
                    if c == ans[s-1]:
                        continue
                    else:
                        print(-1)
                        sys.exit()
        else:
            if ans[s-1] == -1:
                    ans[s-1] = c
            else:
                if c == ans[s-1]:
                        continue
                else:
                    print(-1)
                    sys.exit()
    if ans[0] == -1:
        ans[0] = 1
    for i in range(n):
        if ans[i] == -1:
            ans[i] = 0
    ans2 = ""
    for i in range(n):
        ans2 += str(ans[i])
    print(ans2)
from decimal import *
a, b = map(float, input().split())

num = decimal('a') * decimal('b')
print(int(num))

### FIXED CODE ###

from decimal import *
a, b = map(str, input().split())
 
num = (Decimal(a) * Decimal(b)).quantize(Decimal('1'), rounding=ROUND_DOWN)
print(num)
h, w, m = map(int, input().split())
h_l = [[] for i in range(h + 1)]
w_l = [[] for i in range(w + 1)]
max_h = 0
max_h_l = []
max_w = 0
max_w_l = []
for _ in range(m):
    h, w = map(int, input().split())
    if h_l[h] :
        h_l[h][1].append(w)
        h_l[h][0] += 1
    else:
        h_l[h] = [1, [w]]
        
    if h_l[h][0] > max_h:
        max_h_l = [h]
        max_h = h_l[h][0]
    if h_l[h][0] == max_h:
        max_h_l.append(h)
            
 
        
    if w_l[w]:
        w_l[w][1].append(h)
        w_l[w][0] += 1
    else:
        w_l[w] = [1, [h]]
    if w_l[w][0] > max_w:
        max_w_l = [w]
        max_w = w_l[w][0]
    if w_l[w][0] == max_w:
        max_w_l.append(w)
 
 
flag = 0
ans = 0
for i in max_h_l:
    if flag == 1:
        break
    for j in max_w_l:
        if flag == 1:
            break
        if j in h_l[i][1]:
            ans = max_h + max_w - 1
        else:
            ans = max_h + max_w
            flag = 1
print(ans)
h, w, m = map(int, input().split())
h_l = [[] for i in range(h + 1)]
w_l = [[] for i in range(w + 1)]
max_h = 0
max_h_l = []
max_w = 0
max_w_l = []
for _ in range(m):
    h, w = map(int, input().split())
    if h_l[h] :
        h_l[h][1].append(w)
        h_l[h][0] += 1
    else:
        h_l[h] = [1, [w]]
        
    if h_l[h][0] > max_h:
        max_h_l = [h]
        max_h = h_l[h][0]
    if h_l[h][0] == max_h:
        max_h_l.append(h)
            

        
    if w_l[w]:
        w_l[w][1].append(h)
        w_l[w][0] += 1
    else:
        w_l[w] = [1, [h]]
    if w_l[w][0] > max_w:
        max_w_l = [w]
        max_w = w_l[w][0]
    if w_l[w][0] == max_w:
        max_w_l.append(w)


flag = 0
ans = 0
for i in set(max_h_l):
    if flag == 1:
        break
    for j in set(max_w_l):
        if flag == 1:
            break
        if j in h_l[i][1]:
            ans = max_h + max_w - 1
        else:
            ans = max_h + max_w
            flag = 1
print(ans)

### FIXED CODE ###

h, w, m = map(int, input().split())
h_l = [[] for i in range(h + 1)]
w_l = [[] for i in range(w + 1)]
max_h = 0
max_h_l = []
max_w = 0
max_w_l = []
inputs = {}
for _ in range(m):
    h, w = map(int, input().split())
    inputs.setdefault(h, set([w]))
    inputs[h].add(w)

    if h_l[h] :
        h_l[h][1].add(w)
        h_l[h][0] += 1
    else:
        h_l[h] = [1, set([w])]
        
    if h_l[h][0] > max_h:
        max_h_l = [h]
        max_h = h_l[h][0]
    elif h_l[h][0] == max_h:
        max_h_l.append(h)
 
        
    if w_l[w]:
        w_l[w][1].add(h)
        w_l[w][0] += 1
    else:
        w_l[w] = [1, set([h])]
    if w_l[w][0] > max_w:
        max_w_l = [w]
        max_w = w_l[w][0]
    elif w_l[w][0] == max_w:
        max_w_l.append(w)

ans = max_h + max_w -1
flag = 0
for i in max_h_l:
    if flag == 1:
        break
    for j in max_w_l:
        if j not in inputs[i]:
            ans = max_h + max_w
            flag = 1
            break
        
print(ans)
s=str(input())
if s ="ARC":
  print("ABC")
else:
  print("ARC")

### FIXED CODE ###

s=str(input())
if s =="ARC":
  print("ABC")
else:
  print("ARC")
import math
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(math.gcd,A))

### FIXED CODE ###

import fractions
from functools import reduce
N = int(input())
A = input().split()
A = [int(i) for i in A]
print(reduce(fractions.gcd,A))
import math
def acinput():
    return list(map(int,input().split(" ")))

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

a,b,c,d=acinput()


l=lcm(c,d)
n_CandD=int(b/l)-int((a-1)/l)
n_C=int(b/c)-int((a-1)/c)
n_D=int(b/d)-int((a-1)/d)

print(int(b-a+1-(n_C+n_D-n_CandD)))


### FIXED CODE ###

def gcd(a,b):
    while b > 0:
        a, b = b, a % b
    return a


def acinput():
    return list(map(int, input().split(" ")))
def lcm(x, y):
    return x*y //gcd(x, y)

a, b, c, d = acinput()
l = lcm(c, d)
CD = b//l-(a-1)//l
nC = b//c-(a-1)//c
nD = b//d-(a-1)//d

res = b-a+1-(nC+nD-CD)
print(int(res))
x=(input())
print(x^3)

### FIXED CODE ###

x=int(input())
print(x**3)
def make_divisors(n):
    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.sort()
    return divisors

N = int(input())
if make_divisors(N)[0] < 10 and make_divisors(N)[1] < 10:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A, B = map(int, input().split())
if A < 10 and B < 10:
    print(A*B)
else:
    print(-1)
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stdlib.h>

using namespace std;
char in[120];
pair<pair<string, int>, int> p[110];

int main () {
  int N;
  cin >> N;
  for (int i = 0; i< N; i++) {
    int t;
    string tmp;
    cin >> tmp >> t;
    
    p[i]=make_pair(make_pair(tmp,-t),i);
  }  
  sort(p,p+N);
  for (int i = 0; i<N;i++) {
    cout << p[i].second+1 << endl;
  }
}

### FIXED CODE ###

#from IPython import embed
N=int(input())
n = []

from collections import Counter

c = Counter()

for i in range(N):
    k = input().split()
    k[1] = int(k[1])
    k.append(i+1)
    n.append(k)
    c.update([k[0]])



n.sort()
#n = n[::-1]
prev = ""
l = []
cnt = 0
#print(c)
for a in n:
    #print(a)

    if c[a[0]] > 1:
        l.append(a[1:])
        #print(a[1:])
        cnt+=1
        #print(a[0])
        #embed()
        if cnt == c[a[0]]:
            l.sort()
            #print(l)
            for i in l[::-1]:
                print(i[1])
            cnt = 0
            l = []
    else:
        print(a[2])
N,K = map(int,input().split())
S = str(input())
if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
print(S)

### FIXED CODE ###

N,K = map(int,input().split())
S = list(str(input()))
if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
print(''.join(S))
d = dict(a=input(), b=input(), c=input())
op = 'a'
while True:
    if not d[op]:
        print(op.upper())
        break
    op = d[op].pop(0)


### FIXED CODE ###

d = dict(a=list(input()), b=list(input()), c=list(input()))
op = 'a'
while True:
    if not d[op]:
        print(op.upper())
        break
    op = d[op].pop(0)
N,K=map(int, input().split())
A=list(map(int, input().split()))

loopcount=0
tmpPoint=1
vis={1:0}
for i in range(N):
    Next=A[tmpPoint-1]
    if Next in vis:
        startat=i
        #print(startat)
        #print(tmpPoint)
        #print(vis)
        #print(Next)
        #print(vis[Next]+1)
        loopcount=i - vis[Next]+1
        break
    vis[Next]=i+1
    tmpPoint=Next

if loopcount==0:
    print(tmpPoint)
    exit()
if startat+loopcount < K:
    nokori=(K-startat) % loopcount

tmpPoint=1
for i in range(startat+nokori):
    Next=A[tmpPoint-1]
    tmpPoint=Next
print(tmpPoint)

### FIXED CODE ###

N,K=map(int, input().split())
A=list(map(int, input().split()))

loopcount=0
tmpPoint=1
vis={1:0}
for i in range(N):
    Next=A[tmpPoint-1]
    if Next in vis:
        startat=i
        #print(startat)
        #print(tmpPoint)
        #print(vis)
        #print(Next)
        #print(vis[Next]+1)
        loopcount=i - vis[Next]+1
        break
    vis[Next]=i+1
    tmpPoint=Next

if loopcount==0:
    print(tmpPoint)
    exit()
if startat+loopcount < K:
    nokori=(K-startat) % loopcount
    K=startat+nokori

tmpPoint=1
for i in range(K):
    Next=A[tmpPoint-1]
    tmpPoint=Next
print(tmpPoint)
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
  	for j in range(i+1,R+1):
    	seki=i*j
    	amari=seki%2019
    	if amari<kotae:
     		kotae=amari
print(kotae)
  


### FIXED CODE ###

L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

import string

def main():
    n,m = i_map()
    c = [[10]*n for _ in range(n)]

    for _ in range(m):
        a,b = i_map()
        c[a-1][b-1] = 1
        c[b-1][a-1] = 1

    for i,k in enumerate(c[0]):
        if k == 1:
            if c[i][-1] == 1:
                print("POSSIBLE")
                exit()
    print("IMPOSSIBLE")


if __name__=="__main__":
    main()


### FIXED CODE ###

N, M = map(int, input().split())
L = [list(map(int, input().split())) for i in range(M)]
s = []
g = []
for i in range(M):
    if 1 == L[i][0]:
        s.append(L[i][1])
    if 1 == L[i][1]:
        s.append(L[i][0])
        
for i in range(M):
    if N == L[i][0]:
        g.append(L[i][1])
    if N == L[i][1]:
        g.append(L[i][0])
        
if set(g)&set(s):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
a,b = map(int, raw_input().split())
print a*b (a+b)*b

### FIXED CODE ###

a,b=map(int,raw_input().split())
print a*b,(a+b)*2
from math import ceil


def grundy(a, k):
    if a < k:
        return 0
    d, m = divmod(a, k)
    if m == 0:
        return d
    d1 = d + 1
    if d > k:
        return grundy(a - d1, k)
    e = ceil(m / d1) * d1
    return grundy(a - e, k)


n = int(input())
nim = 0
for _ in range(n):
    a, k = map(int, input().split())
    nim ^= grundy(a, k)
print('Takahashi' if nim > 0 else 'Aoki')


### FIXED CODE ###

import sys

sys.setrecursionlimit(10000000)
from math import ceil


def grundy(a, k):
    if a < k:
        return 0
    d, m = divmod(a, k)
    if m == 0:
        return d
    d1 = d + 1
    if d > k:
        return grundy(a - d1, k)
    e = ceil(m / d1) * d1
    return grundy(a - e, k)


n = int(input())
nim = 0
for _ in range(n):
    a, k = map(int, input().split())
    nim ^= grundy(a, k)
print('Takahashi' if nim > 0 else 'Aoki')
import math

a, b = map(int, input().split())
g = math.gcd(a, b)
g_2 = int(math.sqrt(g))
cnt = 1

for i in range(2, g_2+1):
    if g % i == 0:
        while g % i == 0:
            g //= i
        cnt += 1
if g > 1:
    cnt += 1

print(cnt)

### FIXED CODE ###

import math

def gcd(n, m):
    while m != 0:
        n, m = m, n % m
    return n

a, b = map(int, input().split())
g = gcd(a, b)
g_2 = int(math.sqrt(g))
cnt = 1

for i in range(2, g_2+1):
    if g % i == 0:
        while g % i == 0:
            g //= i
        cnt += 1
if g > 1:
    cnt += 1

print(cnt)
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
mod = 10**9+7 #出力の制限
N = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
x,y = map(int,input().split())
if (x+y)%3 != 0:
  print(0)
else:
  n = (x+y)//3
  r = min(abs(2*n-x),abs(n-x))
a = cmb(n,r,mod)
print(a)

### FIXED CODE ###

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod
mod = 10**9+7 #出力の制限
N = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
x,y = map(int,input().split())
if (x+y)%3 != 0:
  print(0)
else:
  n = (x+y)//3
  r = min(abs(2*n-x),abs(n-x))
  if 2*n < x or x < n:
    print(0)
  else:
    a = cmb(n,r,mod)
    print(a)
n=int(input())
ans=(n*(n+1)//2)-1-n+n%2
if n==1:
  print("0")
else if n==2:
  print("1")
else:
  print(ans)

### FIXED CODE ###

n=int(input())
if n==1:
  print(0)
else:
  print(n*(n-1)//2)
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
import math
from collections import *
from functools import reduce,cmp_to_key,lru_cache
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
import sys
# input = sys.stdin.readline



M = mod = 10**9 + 7 
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)
 
def li():return [int(i) for i in input().rstrip().split()]
def st():return str(input().rstrip())[2:-1]
def val():return int(input().rstrip())
def li2():return [str(i)[2:-1] for i in input().rstrip().split()]
def li3():return [int(i) for i in st()]
 



# sys.setrecursionlimit(10 ** 5 + 10)

g = 0
d = {}
def dp(i, par = -1, black = 0):
    global g
    ans = 1
    if (i, par, black) in d:return d[(i, par, black)]
    nokids = 1
    if black:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ans * dp(j, i, 0) % mod
    else:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ( ans * (dp(j, i, 0) + dp(j, i, 1)) ) % mod

    if nokids:ans = 1
    d[(i, par, black)] = ans
    return ans



n = val()
g = defaultdict(set)

l = []
for _ in range(n - 1):
    a, b = li()
    g[a].add(b)
    g[b].add(a)


root = 1    
ans = dp(root, -1, 0) + dp(root, -1, 1)

print(ans % mod)

### FIXED CODE ###

from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop,heapify
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

from itertools import accumulate
from functools import lru_cache

M = mod = 10 ** 9 + 7
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)
 
def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]
 



sys.setrecursionlimit(10 ** 6)

g = 0
@lru_cache(None)
def dp(i, par = -1, black = 0):
    global g
    ans = 1
    nokids = 1
    if black:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ans * dp(j, i, 0) % mod
    else:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ( ans * (dp(j, i, 0) + dp(j, i, 1)) ) % mod

    if nokids:ans = 1
    return ans



n = val()
g = [[] for i in range(n + 1)]

l = []
for _ in range(n - 1):
    a, b = li()
    g[a].append(b)
    g[b].append(a)


root = 1    
ans = dp(root, -1, 0) + dp(root, -1, 1)

print(ans % mod)
import math
a, b, c = map(int, input().split())
a_sqrt = math.sqrt(a)
b_sqrt = math.sqrt(b)
c_sqrt = math.sqrt(c)

if (a==c) or (b==c):
	print('No')

elif (a_sqrt+b_sqrt) < c_sqrt:
	print('Yes')

else:
	print('No') 

### FIXED CODE ###

list_32 = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
K -= 1
print(list_32[K])
N = int(input())

x_list=[]
y_list=[]
h_list=[]

def all_same(items):
	return all(map(lambda x: x == items[0], items))

for i in range(N):
	x,y,h=map(int, input().split())
	x_list.append(x)
	y_list.append(y)
	h_list.append(h)	
		
for cy in range(N+1):
	for cx in range(N+1):
		H_list = []
		for i in range(N):
			if h_list[i] != 0:
				H = abs(cx - x_list[i])+abs(cy - y_list[i])+h_list[i]
				H_list.append(H) 
			if h_list[i] == 0:
				H = abs(cx - x_list[i])+abs(cy - y_list[i])+h
				if H > 0:
					break
		if all_same(H_list):
			print(str(cx)+' '+str(cy)+' '+str(H_list[0]))
			break		
	else:
		continue
	break

### FIXED CODE ###

N = int(input())

x_list=[]
y_list=[]
h_list=[]


def all_same(items):
	return all(map(lambda x: x == items[0], items))

for i in range(N):
	x,y,h=map(int, input().split())
	x_list.append(x)
	y_list.append(y)
	h_list.append(h)
		
for cy in range(101):
	for cx in range(101):
		n = -1	
		for h in h_list:
			n += 1
			if h >= 1:
				H = abs(cx - x_list[n])+abs(cy - y_list[n])+h
				h_now_list=[]
				break
		for i in range(N):
			h_now = max((H-abs(cx - x_list[i])-abs(cy - y_list[i])), 0)
			h_now_list.append(h_now)
			if h_now != h_list[i]:
				break	
			else:
				if len(h_now_list)==N:
					print(str(cx)+' '+str(cy)+' '+str(H))
					break
	else:
		continue
	break
today = input()
if today == "Sunny":
	print("Cloudy")
elif today == "Cloudy":
	print("Rainy")
elif today == "Rainy":
    print("Sunny”)


### FIXED CODE ###

s=input()
if s=='Sunny':
  print('Cloudy')
elif s=='Cloudy':
  print('Rainy')
else:
  print('Sunny')
alphabet = "abcdefghijklmnopqrstuvwxyz"
indmap = {}
for i, c in enumerate(alphabet):
    indmap[c] = i

MOD = 10L**9 + 7L

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

    counts = [0L]*26
    for c in s:
        counts[indmap[c]] += 1L

    #print(counts)
    total = 1L
    for k in counts:
        total *= (k+1L)
        total % MOD
    print(total-1)

main()


### FIXED CODE ###


alphabet = "abcdefghijklmnopqrstuvwxyz"
indmap = {}
for i, c in enumerate(alphabet):
    indmap[c] = i

MOD = 10**9 + 7

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

    counts = [0]*26
    for c in s:
        counts[indmap[c]] += 1

    #print(counts)
    total = 1
    for k in counts:
        total *= (k+1)

    print((total-1) % MOD)

if __name__ == "__main__":
    main()
x = int(input())
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == x:
            print(a, b)
            quit()

### FIXED CODE ###

s = input()
print('ABC' if s == 'ARC' else 'ARC')