Harryxun/stf_run huggingface dataset:
N = int(input())
palette = [1]
colors = [None] * N
edges = [None] * N
ends = {}

for i in range(1,N):
    edges[i] = [int(n) for n in input().split()]

for i in range(1,N):
    a, b = edges[i]
    if a not in ends:
        ends[a] = [i]
    else:
        ends[a].append(i)
    if b not in ends:
        ends[b] = [i]
    else:
        ends[b].append(i)


def color_edges(parent, root):
    p = palette[:]
    if parent > 0:
        p = [color for color in p if color != colors[parent]]
    for i in ends[root]:
        if i == parent:
            continue
        if len(p) > 0:
            colors[i] = p[0]
            del p[0]
        else:
            color = len(palette) + 1
            palette.append(color)
            colors[i] = color
    for i in ends[root]:
        if i == parent:
            continue
        a, b = edges[i]
        if a == root:
            color_edges(i, b)
        else:
            color_edges(i, a)

color_edges(0, 1)

print(len(palette))
for i in range(1,N):
    print(colors[i])

### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

N = int(input())
palette = 1
colors = {}
ends = {}
edges = {}

for edge in range(1,N):
    ends[edge] = [int(n) for n in input().split()]

    a, b = ends[edge]
    if a not in edges:
        edges[a] = [edge]
    else:
        edges[a].append(edge)
    if b not in edges:
        edges[b] = [edge]
    else:
        edges[b].append(edge)


def color_edges(parent, root):
    ng = {}
    global palette
    if parent > 0:
        ng[colors[parent]] = True
    for edge in edges[root]:
        if edge in colors:
            color = colors[edge]
        elif palette - len(ng) > 0:
            color = 1
            while color in ng:
                color += 1
            colors[edge] = color
        else:
            palette += 1
            color = palette
            colors[edge] = color

        ng[color] = True
    for edge in edges[root]:
        if edge == parent:
            continue
        a, b = ends[edge]
        if a == root:
            color_edges(edge, b)
        else:
            color_edges(edge, a)

max_edges = 1
root = 1
for node in range(1,N+1):
    if len(edges[node]) > max_edges:
        max_edges = len(edges[node])
        root = node

color_edges(0, root)

print(palette)
for edge in range(1,N):
    print(colors[edge])
S = input()
W = ["Sunny","Cloudy","Rainy"]
print(W[W.index(S)+1 % 3])

### FIXED CODE ###

S = input()
W = ["Sunny","Cloudy","Rainy"]
print(W[(W.index(S)+1) % 3])
import functools
import operator
n = int(input())
p = list(map(float, input().split()))
half = n // 2 + 1

dp = [[None] * (n + 1) for _ in range(n + 1)]
def dfs(n=half, depth=n - 1):
    if depth < 0 or (n - 1) > depth:
        return 0

    if dp[n][depth] is not None:
        return dp[n][depth]

    if n == 0:
        r = functools.reduce(operator.mul, map(lambda x: 1 - x, p[:depth + 1]))
    elif (n - 1) == depth:
        r = functools.reduce(operator.mul, p[:depth + 1])
    else:
        r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])
    dp[n][depth] = r
    return r

print(sum(dfs(i) for i in range(half, n + 1)))




### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

import functools
import operator
n = int(input())
p = list(map(float, input().split()))
half = n // 2 + 1

dp = [[None] * (n + 1) for _ in range(n + 1)]
def dfs(n=half, depth=n - 1):
    if depth < 0 or (n - 1) > depth:
        return 0

    if dp[n][depth] is not None:
        return dp[n][depth]

    if n == 0:
        r = functools.reduce(operator.mul, map(lambda x: 1 - x, p[:depth + 1]))
    elif (n - 1) == depth:
        r = functools.reduce(operator.mul, p[:depth + 1])
    else:
        r = dfs(n - 1, depth - 1) * p[depth] + dfs(n, depth - 1) * (1 - p[depth])
    dp[n][depth] = r
    return r

print(sum(dfs(i) for i in range(half, n + 1)))
N = int(input())
nums = [input() for i in range(N)]

max_list = []

for i in range(0, N):
    f_nums = nums[:i-1]
    l_nums = nums[i+1:]
    f_nums.extend(l_nums)
    _max = max(f_nums)
    max_list.append(_max)

for x in max_list:
    print(x)
    




### FIXED CODE ###

N = int(input())
nums = [int(input()) for i in range(N)]

_nums = sorted(nums, reverse=True)
max1 = _nums[0]
max2 = _nums[1]
for i in range(0, N):
    if nums[i] == max1:
        print(max2)
    else:
        print(max1)
a=input()
b=input()
printf('Yes' if a in (b*2) else 'No')

### FIXED CODE ###

a=input()
b=input()
print('Yes' if a in (b*2) else 'No')
A,B,C=int(input().split())
if A==B and B==C:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

A=list(map(int,input().split()))
if A[0]==A[1] and A[1]==A[2] and A[0]>0:
  print("Yes")
else:
  print("No")
a,b,c,d,e,f = map(int, input().split())

per = 0
ans = []

for i in range(f//(100*a) + 1):
    for j in range(f//(100*b) + 1):
        w = i * a * 100 + j * b * 100
        if w > f or w == 0:
            break
        for k in range((e * w//100)//c + 1):
            for l in range((e * w//100)//d + 1):
                if e * w//100 < c * k + d * l or w + c * k + d * l > f:
                    break
                now = 100 * (c*k+d*l) / (w+c*k+d*l)
                if per < now:
                    per = now
                    ans = [w+c*k+d*l, c*k+d*l]

print(ans[0], ans[1])



### FIXED CODE ###

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

per = 0
ans = []

for i in range(f//(100*a) + 1):
    for j in range(f//(100*b) + 1):
        w = i * a * 100 + j * b * 100
        if w > f or w == 0:
            break
        for k in range((e * w//100)//c + 1):
            for l in range((e * w//100)//d + 1):
                if e * w//100 < c * k + d * l or w + c * k + d * l > f:
                    break
                now = 100 * (c*k+d*l) / (w+c*k+d*l)
                if per < now:
                    per = now
                    ans = [w+c*k+d*l, c*k+d*l]
if ans == []:
    print(100*a, 0)
else:
    print(ans[0], ans[1])
S=list(map(int,input().split()))
for i in range(2):
    if count(S[i])==1:
        print(S[i])

### FIXED CODE ###

S=list(map(int,input().split()))
for i in range(3):
    if S.count(S[i])==1:
        print(S[i])
n,l=map(int,input().split())
s=[]
for i in range(n):
  s.append(input())
  
  
s.sort()
for i in range(l):
  print(s[i],end="")
         

### FIXED CODE ###

n,l=map(int,input().split())
s=[]
for i in range(n):
  s.append(input())
  
  
s.sort()
print("".join(s))
N=int(input())
A=[int(x) for x in input().split()]
#重複始点終点調査
se=[]
c=sum(A)-N*(N+1)/2:
for i in range(len(A)):
  if A[i]==c:
    se.append(i)
l=se[0]
r=se[1]

mod=10**9+7
 
#階乗計算
factorial=[1]
inverse=[1]
for i in range(1,N+2):
    factorial.append(factorial[-1]*i %mod)
    inverse.append((pow(factorial[i], mod-2, mod)))
#combination計算
def nCr(n,r):
  if n<r or n==0 or r==0:
    return 0
  return factorial[n] * inverse[r] * inverse[n-r] % mod

print(N)
for i in range(2,N+2):
    print(int(nCr(N+1,i)-nCr(l+N-r,i-1))%mod)


### FIXED CODE ###

N=int(input())
A=[int(x) for x in input().split()]
#重複始点終点調査
se=[]
c=sum(A)-N*(N+1)/2
for i in range(len(A)):
  if A[i]==c:
    se.append(i)
l=se[0]
r=se[1]

mod=10**9+7
 
#階乗計算
factorial=[1]
inverse=[1]
for i in range(1,N+2):
    factorial.append(factorial[-1]*i %mod)
    inverse.append((pow(factorial[i], mod-2, mod)))
#combination計算
def nCr(n,r):
  if n<r or n==0 or r==0:
    return 0
  return factorial[n] * inverse[r] * inverse[n-r] % mod

print(N)
for i in range(2,N+2):
    print(int(nCr(N+1,i)-nCr(l+N-r,i-1))%mod)
#dfs
import sys
sys.setrecursionlimit(10 ** 7)

#dfs
M = int(input())
L = []
for i in range(M):
    d, c = map(int, input().split())
    L.extend([d] * c)

answer = 0

def dfs(count, l):
    global answer
    if len(l) == 1:
        #print(count)
        answer = max(answer, count)
    else:
        for i in range(len(l)-1):
            sum = l[i] + l[i+1]
            result = l[:i] + [int(x) for x in list(str(sum))] + l[i+2:]
            #print(result)
            dfs(count+1, result)

dfs(0, L)
print(answer)


### FIXED CODE ###

import sys
import numpy as np

stdin = sys.stdin
 
ni = lambda:int(ns())
na = lambda:list(map(int,stdin.readline().split()))
ns = lambda:stdin.readline().rstrip()  # ignore trailing spaces

M = ni()
D = [] ; C = []

for i in range(M):
    d, c = na()
    D.append(d)
    C.append(c)

D = np.array(D) ; C = np.array(C)
#桁数の9倍とそれぞれの数字の総和をx
x = C.sum() * 9 + (C * D).sum()
# 18以下で終了
answer = (x + 8) // 9 - 2
print(answer)
args=input()
a=args[0]
b=args[1]
print('Yes')

### FIXED CODE ###

n = int(input())
s = input()
if n % 2:
    print("No")
    exit()
half = s[0:n // 2]
print("Yes" if s == half + half else "No")
a=int(input())
b=float(input())
print(int(a*b))


### FIXED CODE ###

import decimal
a,b=input().split()
a=int(a)
b=decimal.Decimal(b)
print(int(a*b))
a,b=map(int,input())
if a<=b:
  print(a)
else:
  print(a-1)

### FIXED CODE ###

a,b=map(int,input().split())
if a<=b:
  print(a)
else:
  print(a-1)
def fact(n):
  ret=1
  for i in range(2.n+1):
    ret=ret*i
  return ret

n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=0
cnt2=0
checked1=[0]*(n+1)
checked2=[0]*(n+1)
for i in range(n):
  checked1[arr1[i]]=1
  checked2[arr2[i]]=1
  cnt1+=(arr1[i]-1-sum(checked1[:arr1[i]]))*fact(n-i-1)
  cnt2+=(arr2[i]-1-sum(checked1[:arr2[i]]))*fact(n-i-1)
print(abs(cnt1-cnt2))

### FIXED CODE ###

import itertools
n=int(input())
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
arrs=list(itertools.permutations(range(1,n+1)))
cnt1=0
cnt2=0
for i in range(len(arrs)):
  if arrs[i]==p:
    cnt1=i
  if arrs[i]==q:
    cnt2=i
print(abs(cnt2-cnt1))
n=int(input())
vvw=[list(map(int,input().split())) for i in range(n-1)]

class UnionFind:
    def __init__(self, n):
        # 親要素のノード番号を格納。par[x] == xの時そのノードは根
        self.par = [i for i in range(n+1)]
        # 木の高さを格納する（初期状態では0）
        self.rank = [0] * (n+1)

    # 検索
    # 根ならその番号を返す
    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            # 走査していく過程で親を書き換える
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    # 同じ集合に属するか判定
    def same_check(self, x, y):
        return self.find(x) == self.find(y)

    # 併合
    def union(self, x, y):
        # 根を探す
        x = self.find(x)
        y = self.find(y)
        # 木の高さを比較し、低いほうから高いほうに辺を張る
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            # 木の高さが同じなら片方を1増やす
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

uf=UnionFind(n)
for i in range(n-1):
    if vvw[i][2]%2==1:
        uf.union(vvw[i][0], vvw[i][1])

ans=[]
for i in range(1,n+1):
    # print(ans)
    if uf.par[i]==i:
        print(0)
        ans.append(0)
    else:
        # print(uf.par[i])
        if ans[uf.par[i]-1]==1:
            print(0)
            ans.append(0)
        else:
            print(1)
            ans.append(1)

    # print(0 if uf.par[i]%2==0 else 1)

### FIXED CODE ###

import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
uvw=[list(map(int,input().split())) for i in range(n-1)]
class WeightedUnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n+1)]
        self.rank = [0] * (n+1)
        self.weight = [0] * (n+1)


    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            y = self.find(self.par[x])
            self.weight[x] += self.weight[self.par[x]]
            self.par[x] = y
            return y

    def union(self, x, y, w):
        rx = self.find(x)
        ry = self.find(y)
        if self.rank[rx] < self.rank[ry]:
            self.par[rx] = ry
            self.weight[rx] = w - self.weight[x] + self.weight[y]
        else:
            self.par[ry] = rx
            self.weight[ry] = -w - self.weight[y] + self.weight[x]
            if self.rank[rx] == self.rank[ry]:
                self.rank[rx] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def diff(self, x, y):
        return self.weight[x] - self.weight[y]
uf=WeightedUnionFind(n)
for i in range(n-1):
    uf.union(uvw[i][0],uvw[i][1],uvw[i][2])

for i in range(n):
    if uf.diff(i+1,uf.find(i+1))%2==0:
        print(0)
    else:
        print(1)
X, A = list(map(int, input().split()))
if X < A:
  print(0)
elif X => A:
  print(10)
  
  


### FIXED CODE ###

X, A = list(map(int, input().split()))
if X < A:
  print(0)
elif A <= X:
  print(10)
N, X = map(int, input().split())
m = [0]*N
for i in ragne(N):
    m[i] = int(input())
min_donut = min(m)
sum_gram = sum(m)
dif = X - sum_gram
number = dif // min_donut
print(N + number)

### FIXED CODE ###

N, X = map(int, input().split())
donut = [0]*N
for i in range(N):
    donut[i] = int(input())
min_gram = min(donut)
gram = sum(donut)
dif = X - gram
number = dif // min_gram
print(N + number)
a,b,c = input ().split ()
a,b = int (a,b)
if b == '+':
  print (a+b)
else:
  print (a-b)


### FIXED CODE ###

a,b,c = input ().split ()
a = int (a)
c = int (c)
if b == '+':
  print (a+c)
else:
  print (a-c)
N,M = map(int, input().split())
drink_list = [list(map(int, input().split())) for _ in range(N)]

drink_list.sort(key=lambda x: x[0])
#print(drink_list)

_cnt=0
_sum=0
i=0
if N==1 or drink_list[i][1]>=M:
    _sum=drink_list[i][0]*M
else:
    while _cnt<M:
        if _cnt+drink_list[i][1]>M:
            break
        else:
            _sum+=drink_list[i][0]*drink_list[i][1]
            _cnt+=drink_list[i][1]
            i+=1
        #print(_sum,_cnt,i)
    _sum+=drink_list[i][0]*(M-_cnt)

print(_sum)

### FIXED CODE ###

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

drink_list.sort(key=lambda x: x[0])
#print(drink_list)

_cnt=0
_sum=0
i=0
if N==1 or drink_list[i][1]>=M:
    _sum=drink_list[i][0]*M
else:
    while _cnt<=M:
        if _cnt+drink_list[i][1]>=M:
            break
        else:
            _sum+=drink_list[i][0]*drink_list[i][1]
            _cnt+=drink_list[i][1]
            i+=1
        #print(_sum,_cnt,i)
    _sum+=drink_list[i][0]*(M-_cnt)

print(_sum)
n = int(raw_input())
for i in xrange(n):
	x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
	z1 = (y1 - y2) / (x1 - x2)
	z2 = (y3 - y4) / (x3 - x4)
	if z1 == z2:
		print "YES"
	else:
		print "NO"

### FIXED CODE ###

n = int(raw_input())
for i in range(0, n):
	x1,y1,x2,y2,x3,y3,x4,y4 = map(float,raw_input().split())
 
	z1 = (x1 - x2) * (y3 - y4)
	z2 = (x3 - x4) * (y1 - y2)
 
	if abs(z1 - z2) < 1e-10:
		print "YES"
	else:
		print "NO"
n,x,y=map(int, input().split())

ans=[0]*n-1

for i in range(n):
    for j in range(n):
        ans[min(j-i, abs(x-i)+1+abs(j-y), abs(y-i)+1+abs(j-x))]+=1

for a in ans:
    print(a)

### FIXED CODE ###

n,x,y=map(int, input().split())

ans=[0]*(n-1)

for i in range(1, n+1):
    for j in range(i+1, n+1):
        d=min(j-i, abs(x-i)+1+abs(j-y), abs(y-i)+1+abs(j-x))
        #print(i,j,d)
        ans[d-1]+=1

for a in ans:
    print(a)
S=input()
K=int(input())
S=list(S)

for j in range(len(S)):
    if S[j]=='1':
        if j==K:
            ans=1
    else:
        x=[i for i in S if i!="1"]
        ans=x[0]

print(ans)


### FIXED CODE ###

S=input()
K=int(input())
S=list(S)

for j in range(len(S)):
    if S[j]=='1':
        if j==K-1:
            ans=1
            break
    else:
        x=[i for i in S if i!='1']
        ans=x[0]
        break

print(ans)
s = input()

orgin = set(list(s))

if len(orgin) > 2:
    print("No")
    exit()

a=0
b=0
for i in s:
    if i == origin[0]: a+=1
    elif i == origin[1]: b+=1

if a==2:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()

origin = list(set(list(s)))

if len(origin) > 2:
    print("No")
    exit()
a=0
b=0
for i in s:
    if i == origin[0]: a+=1
    elif i == origin[1]: b+=1

if a==2:
    print("Yes")
else:
    print("No")
def main(n):
    print(str(n).count('2'))


if __name__ == '__main__':
    n = int(input())
    main()


### FIXED CODE ###

def main(n):
    print(str(n).count('2'))


if __name__ == '__main__':
    n = int(input())
    main(n)
n, k=map(int,input().split());print(0 if n%k==o else 1)

### FIXED CODE ###

n, k=map(int, input().split());print(0 if n%k==0 else 1)
read = input
a = [read() for i in range(5)]
a = list(map(int, a))
if all(map(lambda x: x%10 == 0, a)):
    print(sum(a))
else :
    g10 = list(filter(lambda x:x%10 > 0 , a))
    l10 = list(filter(lambda x:x%10 == 0 , a))
    m = min(g10, key=lambda x:x%10)
    g100= list(map(lambda x:x//10*10 + 10, g10))
    print(sum([*g100  ,*l10 ,- m//10*10 + m]))
    

### FIXED CODE ###

read = input
a = [read() for i in range(5)]
a = list(map(int, a))
if all(map(lambda x: x%10 == 0, a)):
    print(sum(a))
else :
    g10 = list(filter(lambda x:x%10 > 0 , a))
    l10 = list(filter(lambda x:x%10 == 0 , a))
    m = min(g10, key=lambda x:x%10)
    g100= list(map(lambda x:x//10*10 + 10, g10))
    print(sum(g100)  +sum(l10)- m//10*10 - 10 + m)
a, b = map(int, input())

n = b - a
original_b = n * (n + 1) // 2

print(original_b - b)

### FIXED CODE ###

a, b = map(int, input().split())
 
n = b - a
original_b = n * (n + 1) // 2
 
print(original_b - b)
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def POW(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x
    elif y % 2 == 0:
        return POW(x, y // 2) ** 2 % MOD
    else:
        return POW(x, y // 2) ** 2 * x % MOD
def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from functools import reduce

def binomials(n, k):
    ret = [0] * (n + 1)
    ret[k] = 1
    denomi = mod_factorial(1, reduce(lambda x, y: x * y % MOD, range(1, k), 1))
    for i in range(k - 1, n):
        numeri = reduce(lambda x, y: x * y % MOD, range(i - k + 2, i + 1), 1)
        ret[i + 1] = numeri * denomi % MOD
    return ret

def main():
    if A > B:
        ans = 'Alice'
    elif A == B:
        ans = 'Draw'
    else:
        ans = 'Bob'
    return ans

print(main())

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def POW(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x
    elif y % 2 == 0:
        return POW(x, y // 2) ** 2 % MOD
    else:
        return POW(x, y // 2) ** 2 * x % MOD
def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from functools import reduce

def main():
    A, B = LI()
    if A == 1:
        A = 14
    if B == 1:
        B = 14
    if A > B:
        ans = 'Alice'
    elif A == B:
        ans = 'Draw'
    else:
        ans = 'Bob'
    return ans

print(main())
n = int(input())
s = list(input())
k = int(input())

a = s[k-1]

for i in range(n):
    if s[i] != a:
        s[i] = "*"
print("".jpin(s))


### FIXED CODE ###


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

a = s[k-1]

for i in range(n):
    if s[i] != a:
        s[i] = "*"
print("".join(s))
from collections import Counter

N = int(input())
A = map(int, input().split())
# N = 5
# A = [2, 4, 4, 0, 2]
mod = 10 ** 9 + 7

cnt = Counter(A)
if N % 2 == 0:
    if len(filter(lambda c: c == 2, cnt.values())) != 0:
        print(0)
    else:
        print(2 ** (N // 2))
else:
    if cnt[0] != 1:
        print(0)
    cnt.pop(0)
    if len(filter(lambda c: c == 2, cnt.values())) != 0:
        print(0)
    else:
        print(2 ** (N // 2))


### FIXED CODE ###

#!/usr/bin/env python
# -*- coding:utf-8 -*-

from collections import Counter
import sys
N = int(input())
A = list(map(int, input().split()))

MOD = 10**9 + 7
A = Counter(A)

if N % 2 == 1:
    for num, cnt in A.items():
        # print(num, cnt)
        if num == 0:
            if cnt != 1:
                print(0)
                sys.exit()
        else:
            if not (num % 2 == 0 and cnt == 2):
                print(0)
                sys.exit()
    print((2 ** (N // 2)) % MOD)
else:
    for num, cnt in A.items():
        # print(num, cnt)
        if not (num % 2 == 1 and cnt == 2):
            print(0)
            sys.exit()
    print((2 ** (N // 2)) % MOD)
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

from math import degrees, atan

a, b, x = li()
c = x / (a*a)

if a * c > (a * b) / 2:
    print(90 - degrees(atan((a / (2*(b-c))))))
else:
    print(90 - degrees(atan(2*a*c / (b**2))))


### FIXED CODE ###

import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

from math import degrees, atan

a, b, x = li()
c = x / (a*a)

if x == a*a*b:
    print(0)
elif a * c > (a * b) / 2:
    print(90 - degrees(atan((a / (2*(b-c))))))
else:
    print(90 - degrees(atan(2*a*c / (b**2))))
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10000)
N = []
v = []
def rec(n):
	global N
	global v
	if v[n] != -1:
		return v[n]

	if N[n] == 1:
		v[n] = 0
	elif n == 1:
		v[n] = 1
	elif N[n-1] == 1:
		v[n] = rec(n-2)
	else:
		v[n] = rec(n-2) + rec(n-1)
	# print("v:", v[n])
	return v[n]

def main():
	global N, v
	n, m = map(int, input().strip().split())
	N = [0] * (n+1)
	v = [-1] * (n+1)
	v[0] = 1
	for i in range(m):
		a = int(input().strip())
		N[a] = 1
	# print(v)
	# print(N)
	print(rec(n) % (10**9+7))

if __name__ == '__main__':
	main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
	n, m = map(int, input().strip().split())
	v = [0] * (n+1)
	v[0] = 1
	v[1] = 1
	N = []
	for i in range(m):
		a = int(input().strip())
		N.append(a)
	N.append(-1)
	j = 0
	for i in range(1, n+1):
		if N[j] == i:
			v[i] = 0
			j += 1
		else:
			if i == 1:
				v[i] = 1
			else:
				v[i] = v[i-1] + v[i-2]
	print(v[n] % (10**9+7))

if __name__ == '__main__':
	main()