(function (g, ti, ts) local a,f,n = {},g(),io.stdin:read("*n") for i=0,n do for j=0,n do ti(a,f(2,j)*f(5,i)) end end ts(a) for _,v in ipairs(a) do print(tostring(v):sub(1,-3)) end end)(function () local h={} return function (x, n) if h[x]==nil then h[x]={} end if h[x][n]==nil then h[x][n]=(x+0LL)^n end return h[x][n] end end, table.insert, table.sort)