import sys import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) nums = np.array(read().split(), np.longdouble) np.sqrt(nums, out=nums) nums = nums.astype(np.longdouble) np.cumsum(nums, out=nums) for k in range(18): i = np.searchsorted(nums, 10**k) j = np.searchsorted(nums, 10**(k+1)) if i != j: A = np.round(nums[i:j], 17-k) print(*A, sep='\n')