def z;gets.split.map &:to_i;end
def x a,b;a[0]*b[1]-b[0]*a[1]end
def v a;[a[2]-a[0],a[3]-a[1]]end
while(n=z)!=[0]*4
a=[n,z,z]
q=a.zip(a.rotate).map{|b,c|(d=x(v(b),v(c))).abs>0&&(s,t=[b,c].map{|i|x(v(b[0,2]+c[0,2]),v(i))}
[s,d-s,t,d-t].all?{|i|d<0?i<=0:i>=0}&&[0,1].map{|i|b[i]+t*(b[i+2]-b[i])/d.to_f})}
puts %w(dai-kichi chu-kichi kichi syo-kichi kyo)[q.all?&&(y=x(v(q[0]+q[1]),v(q[1]+q[2])).abs/1e5)>0&&[38,20,2,0].index{|i|1e-9>i-y}||4]end