Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
	"fmt"
	"math"
)

var scanner = bufio.NewScanner(os.Stdin)

type Point struct {
	x, y float64
}
func main() {
	for scanner.Scan() {
		buf1 := strings.Split(scanner.Text(), " ")
		line1 := make([]float64, len(buf1))
		for i := range line1 {
			line1[i], _ = strconv.ParseFloat(buf1[i], 64)
		}
		if line1[0] == 0 && line1[1] == 0 &&
			line1[2] == 0 && line1[3] == 0 {
				break
		}
		scanner.Scan()
		buf2 := strings.Split(scanner.Text(), " ")
		line2 := make([]float64, len(buf2))
		for i := range line2 {
			line2[i], _ = strconv.ParseFloat(buf2[i], 64)
		}
		scanner.Scan()
		buf3 := strings.Split(scanner.Text(), " ")
		line3 := make([]float64, len(buf3))
		for i := range line2 {
			line3[i], _ = strconv.ParseFloat(buf3[i], 64)
		}
		if !intersect(line1[0], line1[1], line1[2], line1[3], line2[0], line2[1], line2[2], line2[3]) ||
			!intersect(line2[0], line2[1], line2[2], line2[3], line3[0], line3[1], line3[2], line3[3]) ||
			!intersect(line3[0], line3[1], line3[2], line3[3], line1[0], line1[1], line1[2], line1[3]) {
				fmt.Println("kyo")
		} else {
			p1 := intersection(line1[0], line1[1], line1[2], line1[3], line2[0], line2[1], line2[2], line2[3])
			p2 := intersection(line2[0], line2[1], line2[2], line2[3], line3[0], line3[1], line3[2], line3[3])
			p3 := intersection(line3[0], line3[1], line3[2], line3[3], line1[0], line1[1], line1[2], line1[3])
			area := math.Abs((p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x))/2
			if area < 0.00000001 {
				fmt.Println("kyo")
			} else if 1899999.99999999 < area {
				fmt.Println("dai-kichi")
			} else if 999999.99999999 < area {
				fmt.Println("chu-kichi")
			} else if 99999.99999999 < area {
				fmt.Println("kichi")
			} else {
				fmt.Println("syo-kichi")
			}
		}
	}
}

func cross(x1, y1, x2, y2 float64) int {
	z :=  x1 * y2 - y1 * x2
	if 0 < z {
		return 1
	} else if z < 0 {
		return -1
	} else {
		return 0
	}
}

func intersect(x1, y1, x2, y2, x3, y3, x4, y4 float64) bool {
	if 0 <= cross(x2-x1, y2-y1, x3-x1, y3-y1) *
		cross(x2-x1, y2-y1, x4-x1, y4-y1) {
			return false
	}
	if 0 <= cross(x4-x3, y4-y3, x1-x3, y1-y3) *
		cross(x4-x3, y4-y3, x2-x3, y2-y3) {
			return false
	}
	return true
}

func intersection(x1, y1, x2, y2, x3, y3, x4, y4 float64) Point {
	if x3 == x4 {
		x1, x3 = x3, x1
		y1, y3 = y3, y1
		x2, x4 = x4, x2
		y2, y4 = y4, y2
	}
	ret := Point{}
	if x1 == x2 {
		// y軸に平行な直線の場合
		c := (y4 - y3) / (x4 - x3)
		d := y3 - c * x3
		x := x1
		y := c * x + d
		ret.x, ret.y = x, y
	} else {
		a := (y2 - y1) / (x2 - x1)
		b := y1 - a * x1
		c := (y4 - y3) / (x4 - x3)
		d := y3 - c * x3
		x := (d - b) / (a - c)
		y := a * x + b
		ret.x, ret.y = x, y
	}
	return ret
}

C++: #include<stdio.h>
#include<math.h>
//ñ³Ìî{ÆÈé_ð çí·\¢Ì
double Square(double x){return x*x;}
struct Point
{
	double x,y;
	Point(double x,double y):x(x),y(y){}
	Point():x(),y(){}
	const Point operator+(const Point &r)const{return Point(x+r.x,y+r.y);}
	const Point operator-(const Point &r)const{return Point(x-r.x,y-r.y);}
};
const Point operator*(const Point &p,double r){return Point(p.x*r,p.y*r);}
const Point operator*(double r,const Point &p){return p*r;}
const double EPS = 0.001;
//üªÌð_ðßÜ·
//»à»àð·µÄÈ©Á½çAfalseðÔµÜ·
bool IntersectionPoint(Point f1, Point t1, Point f2, Point t2, Point *out)
{
	double d = (t1.x-f1.x)*(t2.y-f2.y) - (t1.y-f1.y)*(t2.x-f2.x);
	if(fabs(d)<EPS) return false;	//½s
	double r = ( (t2.y-f2.y)*(f2.x-f1.x)-(t2.x-f2.x)*(f2.y-f1.y) )/d,
		   s = ( (t1.y-f1.y)*(f2.x-f1.x)-(t1.x-f1.x)*(f2.y-f1.y) )/d;
	if(s<=0 || s>1 || r<=0 || r>1) return false;
	*out = f1 + r*(t1-f1);
	return true;
}
double Distance(Point x,Point y)
{
	return sqrt(Square(x.x-y.x)+Square(x.y-y.y));
}

int main()
{
	Point p[6],c1,c2,c3;
	double S,s,a,b,c;
	int i;
	for(;;)
	{
		for(i=0;i<6;++i)
		{
			if(scanf("%lf%lf",&p[i].x,&p[i].y)-2) return 0;
		}
		if(IntersectionPoint(p[0],p[1],p[2],p[3],&c1) && 
			IntersectionPoint(p[2],p[3],p[4],p[5],&c2) && 
			IntersectionPoint(p[4],p[5],p[0],p[1],&c3) )
		{
			a=Distance(c1,c2);
			b=Distance(c2,c3);
			c=Distance(c3,c1);
			s=(a+b+c)/2;
			S=sqrt(s*(s-a)*(s-b)*(s-c));
			if(S>=1900000)puts("dai-kichi");
			else if(S>=1000000)puts("chu-kichi");
			else if(S>=100000)puts("kichi");
			else puts("syo-kichi");
		}
		else puts("kyo");
	}
	return 1;
}

C++: #include <cstdio>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main(){
  int i,j,x1[3],y1[3],x2[3],y2[3],ty[3]/*x=c >> 1, y=c >> 2*/;
  double a[3],b[3],x3[3],y3[3],sen[3],s;
  long long ans;
  while(1){
    cin >> x1[0] >> y1[0] >> x2[0] >> y2[0];
    if(x1[0] == 0 && x2[0] == 0 && y1[0] == 0 && y2[0] == 0) break;
    for(i=1;i<3;i++) cin >> x1[i] >> y1[i] >> x2[i] >> y2[i];

    for(i=0;i<3;i++){// y = a * x + b
      a[i] = b[i] = 0.0;
      if(x1[i] == x2[i]) ty[i] = 1;
      else if(y1[i] == y2[i]){
	ty[i] = 2;
	a[i] = 0.0;
	b[i] = (double)y1[i];
      }
      else{
	a[i] =(double)  (y1[i] - y2[i]) / (x1[i] - x2[i]);
	b[i] = (double) y1[i] - a[i] * x1[i];
	ty[i] = 0;
      }
    }

    ans = 0;
    for(i=0;i<3;i++){ //ÃÂ¿ÃÂ¹ÃÂ¤ÃÂ¾ÃÂ¬ÃÂ¹ÃÂ§
      if(ty[i] == 1 && ty[(i+1)%3] == 1){
	ans = -1;
	break;
      }
      else if(ty[i] != 1 && ty[(i+1)%3] != 1 && a[i] == a[(i+1)%3]){
	ans = -1;
	break;
      }
    }

    if(ans == 0){
      for(i=0;i<3;i++){
	if(ty[i] == 1){
	  x3[i] = (double)x1[i];
	  y3[i] = a[(i+1)%3] * x3[i] + b[(i+1)%3];
	}
	else{
	  x3[i] = (b[(i+1)%3] - b[i]) / (a[i] - a[(i+1)%3]);
	  if(b[(i+1)%3] == b[i]) x3[i] = 0.0;
	  y3[i] = a[i] * x3[i] + b[i];
	}

	if( (x1[i] <= x2[i] &&(x1[i] > x3[i] || x3[i] > x2[i]))  ||  (x2[i] < x1[i] &&(x2[i] > x3[i] || x3[i] > x1[i]))  ||  (y1[i] <= y2[i] &&(y1[i] > y3[i] || y3[i] > y2[i]))  ||  (y2[i] < y1[i] &&(y2[i] > y3[i] || y3[i] > y1[i])) ){
	  ans = -1.0;
	  break; //ÃÂÃÂ¾ÃÂ¬ÃÂ¤ÃÂÃÂÃÂ¤ÃÂ«ÃÂ¤ÃÂºÃÂÃÂ¤ÃÂ·ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤
	}
	else if( (x1[(i+1)%3] <= x2[(i+1)%3] &&(x1[(i+1)%3] > x3[i] || x3[i] > x2[(i+1)%3]))  ||  (x2[(i+1)%3] < x1[(i+1)%3] &&(x2[(i+1)%3] > x3[i] || x3[i] > x1[(i+1)%3]))  ||  (y1[(i+1)%3] <= y2[(i+1)%3] &&(y1[(i+1)%3] > y3[i] || y3[i] > y2[(i+1)%3]))  ||  (y2[(i+1)%3] < y1[(i+1)%3] &&(y2[(i+1)%3] > y3[i] || y3[i] > y1[(i+1)%3])) ){
	  ans = -1.0;
	  break; //ÃÂÃÂ¾ÃÂ¬ÃÂ¤ÃÂÃÂÃÂ¤ÃÂ«ÃÂ¤ÃÂºÃÂÃÂ¤ÃÂ·ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤ÃÂ¤
	}
      }

      s = 0.0;
      for(i=0;i<3;i++){
	sen[i] = sqrt( pow(x3[i] - x3[(i+1)%3],2) + pow(y3[i] - y3[(i+1)%3],2));
	s += sen[i];
      }
      
      s /= 2;
      if(ans == 0) ans = (long long)sqrt(s * (s - sen[0]) * (s - sen[1]) * (s - sen[2]));
      
      int c = 0;
      for(i=0;i<3;i++){ //ÃÂ£ÃÂ³ÃÂ¤ÃÂ¤ÃÂÃÂÃÂ¾ÃÂ¬ÃÂ¤ÃÂ¬ÃÂ£ÃÂ±ÃÂÃÂÃÂ¤ÃÂ¸ÃÂ²ÃÂ¤ÃÂ¯ÃÂ¤ÃÂ«
	if(x3[i] == x3[(i+1)%3] && y3[i] == y3[(i+1)%3]) c++;
      }
      if(c == 3) ans = -1;
    }

    if(ans >= 1900000) cout << "dai-kichi" << endl;
    else if(ans >= 1000000) cout << "chu-kichi" << endl;
    else if(ans >= 100000) cout << "kichi" << endl;
    else if(ans > 0) cout << "syo-kichi" << endl;
    else cout << "kyo" << endl;

  }
  return 0;
}