import sys
from collections import *
import itertools as it
if __name__ == '__main__':
n,m = list(map(int,input().split()))
map_ = []
for i in range(n):
temp = list(input())
map_.append(temp)
# vis = [[0 for _ in range(m)] for _ in range(n)]
res = 0
a = list(it.chain(*map_))
landsize = a.count('*')
vis = [[0 for _ in range(m)] for _ in range(n)]
max_ = 500
res = 0
final = 500
def dfs(i,j):
global res
global final
if i<0&nbs***bsp;i>=n&nbs***bsp;j < 0&nbs***bsp;j >=m&nbs***bsp;vis[i][j]==1&nbs***bsp;vis[i][j]=='*':
return
if map_[i][j]=='*':
vis[i][j]='*'
if map_[i][j]=='.':
vis[i][j]=1
b = list(it.chain(*vis))
if b.count('*')==landsize:
res += 1
final = min(final,res)
dfs(i+2,j)
dfs(i-2,j)
dfs(i,j+2)
dfs(i,j-2)
for i in range(n):
for j in range(m):
dfs(i,j)
print(final)
'''
2--------------------------------
'''
import sys
import math
def calc(n, win_prob):
initial = n
for i in range(len(win_prob)):
pass
def solve():
n, m = list(map(int, input().split()))
win_prob = list(map(float, input().split()))
res = 0
calc(n, win_prob)
print(3579)
if __name__ == '__main__':
solve()
'''
3 -------------------------
'''
'''
4 -------------------------
'''
import sys
from collections import deque
def solve():
n, m = list(map(int,input().split())) # red blue points
red_cod = list(map(int,input().split())) # red cord
blue_cod = list(map(int, input().split())) # blue cord
red_cod.sort()
blue_cod.sort()
cord = red_cod + blue_cod
cord.sort()
# print(cord)
red_set = set(red_cod)
blue_set = set(blue_cod)
type1, type2, type3 = 0, 0, 0
q = int(input()) # range lens
vec = [] # ranges
for i in range(q):
l,r = list(map(int,input().split()))
red,blue = 0,0
for i in range(l,r+1):
if i in red_set:
red += 1
if i in blue_set:
blue += 1
if red > blue:
type1 += 1
elif red < blue:
type3 += 1
else:
type2 += 1
print(type1,type2,type3)
# print(vec)
if __name__ == '__main__':
solve()
'''
5 -------------------------
'''
import math
import sys
def sigmoid(x):
return 1.0/(1+math.exp(-x))
def sigmoid_vec(x):
res = []
for i in range(len(x)):
res.append(sigmoid(x[i]))
return res
def multily_matrix_vec(matrix,vec):
n = len(vec)
res = []
for i in range(n):
val = 0
for j in range(n):
# print(matrix[i][j],vec[j])
val += matrix[i][j]*vec[j]
res.append(val)
return res
def solve():
c = int(input())
f = list(map(float,input().split()))
n = len(f)
A = []
for i in range(n):
vec = list(map(float,input().split()))
A.append(vec)
# print(c)
# print(f)
# print(A)
out = multily_matrix_vec(A,f)
# print(out)
attetion = sigmoid_vec(out)
# print(attetion)
ret = float('-inf')
index = None
for i in range(len(attetion)):
if attetion[i]>ret:
index = i
ret = attetion[i]
print(index)
if __name__ == '__main__':
solve()
'''
6 -------------------------
'''
import sys
import math
def solve():
n = int(input())
a = list(map(int,input().split()))
a.sort()
count = 0
index = len(a)-1
while True:
avg = sum(a)/len(a)
if avg < a[index]:
while a[index] > avg:
a.pop()
index -= 1
count += 1
else:
break
print(count)
if __name__ == '__main__':
solve()
'''
7 -------------------------
'''
import sys
def sovle():
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
for i in range(len(a)):
if i < len(a):
print(a[i],end=' ')
else:
print(a[i])
if __name__ == '__main__':
sovle()
'''
8 -------------------------
'''
import sys
import heapq
# 5 1
# abcab
n,kk = list(map(int,input().split()))
str_ = input()
size = len(str_)
map_ = {}
res = 0
for i in range(size):
for r in range(i+1,size):
s = str_[0:i+1]+str_[r:size]
for k in range(len(s)):
map_[str_[k]] = map_.get(str_[k],0)+1
for k,freq in map_.items():
arr = []
heapq.heappush(arr,(-freq,k))
if int(-heapq.heappop(arr)[0])<=kk:
res =res+1
print(res)
'''
9 ------
'''
import sys
import math
t = int(input())
for i in range(t):
a,b,c = list(map(int, input().split()))
x = 2
alpha = 0.00001
delta = a*0.5*math.sqrt(x)+b*(1/x)
epoch = 5000
for i in range(epoch):
x = x - alpha*delta
y = a*math.sqrt(x)+b*math.log(x)-c
if abs(y)<=0.00001:
break
print(x)