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 <iostream>
#include <cmath>
 
using namespace std;
 
#define EPS 1e-8
 
struct Point {
    double x,y;
    Point(double x = 0.0, double y = 0.0) : x(x),y(y) {}
    Point operator + (Point p){ return Point(x+p.x,y+p.y); }
    Point operator - (Point p){ return Point(x-p.x,y-p.y); }
    Point operator * (double a){ return Point(x*a,y*a); }
    Point operator / (double a){ return Point(x/a,y/a); }
    double abs(){ return sqrt(norm()); }
    double norm(){ return x*x + y*y; }
};
 
double dot(Point a,Point b){ return a.x*b.x+a.y*b.y; }
double cross(Point a,Point b){ return a.x*b.y-a.y*b.x; }
 
int ccw(Point p0,Point p1,Point p2)
{
    Point a = p1-p0;
    Point b = p2-p0;
    if (cross(a,b) > EPS) return 1;
    if (cross(a,b) < -EPS) return -1;
    if (dot(a,b) < -EPS) return 2;
    if (a.norm() < b.norm()) return -2;
    return 0;
}
 
struct Segment {
    Point p1,p2;
    Segment(){}
    Segment(Point p1,Point p2) : p1(p1),p2(p2) {}
};
 
bool intersectSS(const Segment &s,const Segment &t)    
{
    return (ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0) && 
	(ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0);
}
 
Point getCrossPoint(Segment s, Segment t)
{
    Point b = t.p2 - t.p1;
    double d1 = abs(cross(b,s.p1-t.p1));
    double d2 = abs(cross(b,s.p2-t.p1));
    double d = d1 / (d1 + d2);
    return s.p1+(s.p2-s.p1)*d;
}
 
double getArea(Point a, Point b, Point c)
{
    return fabs(a.x*(b.y-c.y)+b.x*(c.y-a.y)+c.x*(a.y-b.y))/2;
}
 
Segment s[3];
void solve()
{
    Point p1 = getCrossPoint(s[0],s[1]);
    Point p2 = getCrossPoint(s[1],s[2]);
    Point p3 = getCrossPoint(s[2],s[0]);
    double S = getArea(p1,p2,p3);
    if (S >= 1900000) {
	cout << "dai-kichi" << endl;
    } else if (S >= 1000000) {
	cout << "chu-kichi" << endl;
    } else if (S >= 100000) {
	cout << "kichi" << endl;
    } else if(S > 0) {
	cout << "syo-kichi" << endl;
    } else {
	cout << "kyo" << endl;
    }
}
 
int main()
{
    while (true) {
	cin >> s[0].p1.x >> s[0].p1.y >> s[0].p2.x >> s[0].p2.y;
	if (!s[0].p1.x && !s[0].p1.y && !s[0].p2.x && !s[0].p2.y) break;
	for (int i = 0; i < 2; i++) {
	    cin >> s[i+1].p1.x >> s[i+1].p1.y >> s[i+1].p2.x >> s[i+1].p2.y;
	}
	if (intersectSS(s[0],s[1]) && intersectSS(s[1],s[2]) && intersectSS(s[2],s[0])) {
	    solve();
	} else {
	    cout << "kyo" << endl;
	}
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

#define EPS 1e-9

struct Point{
  double x,y;
  Point(double x = 0.0, double y = 0.0) : x(x),y(y) {}
  Point operator + (Point p){ return Point(x+p.x,y+p.y); }
  Point operator - (Point p){ return Point(x-p.x,y-p.y); }
  Point operator * (double a){ return Point(x*a,y*a); }
  Point operator / (double a){ return Point(x/a,y/a); }
  double abs(){ return sqrt(norm()); }
  double norm(){ return x*x + y*y; }
};

typedef Point Vector;
double dot(Vector a,Vector b){ return a.x*b.x+a.y*b.y; }
double cross(Vector a,Vector b){ return a.x*b.y-a.y*b.x; }

int ccw(Point p0,Point p1,Point p2){
  Vector a = p1-p0;
  Vector b = p2-p0;
  if(cross(a,b) > EPS) return 1;
  if(cross(a,b) < -EPS) return -1;
  if(dot(a,b) < -EPS) return 2;
  if(a.norm() < b.norm()) return -2;
  return 0;
}

struct Segment{
  Vector p1,p2;
  Segment(){}
  Segment(Vector p1,Vector p2) : p1(p1),p2(p2) {}
};

bool intersectSS(const Segment &s,const Segment &t){
  return (ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0) && 
         (ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0);
}

Point getCrossPoint(Segment s,Segment t){
  Vector b = t.p2 - t.p1;
  double d1 = abs(cross(b,s.p1-t.p1));
  double d2 = abs(cross(b,s.p2-t.p1));
  double d = d1 / (d1 + d2);
  return s.p1+(s.p2-s.p1)*d;
}

double heron(Point p1,Point p2,Point p3){
  double a = sqrt(pow(p1.x-p2.x,2.) + pow(p1.y-p2.y,2.));
  double b = sqrt(pow(p1.x-p3.x,2.) + pow(p1.y-p3.y,2.));
  double c = sqrt(pow(p2.x-p3.x,2.) + pow(p2.y-p3.y,2.));
  double s = (a+b+c)/2;
  return sqrt(s*(s-a)*(s-b)*(s-c));
}

Segment s[3];
void solve(){
  Point p1 = getCrossPoint(s[0],s[1]);
  Point p2 = getCrossPoint(s[1],s[2]);
  Point p3 = getCrossPoint(s[2],s[0]);

  double S = heron(p1,p2,p3)+EPS;
  if(S >= 1900000){
    cout << "dai-kichi" << endl;
  }else if(S >= 1000000){
    cout << "chu-kichi" << endl;
  }else if(S >= 100000){
    cout << "kichi" << endl;
  }else{
    cout << "syo-kichi" << endl;
  }
}

int main(){
  while(true){
    cin >> s[0].p1.x >> s[0].p1.y >> s[0].p2.x >> s[0].p2.y;
    if(!s[0].p1.x && !s[0].p1.y && !s[0].p2.x && !s[0].p2.y) break;

    for(int i = 0 ; i < 2 ; i++){
      cin >> s[i+1].p1.x >> s[i+1].p1.y >> s[i+1].p2.x >> s[i+1].p2.y;
    }
    if(intersectSS(s[0],s[1]) && intersectSS(s[1],s[2]) && intersectSS(s[2],s[0])){
      solve();
    }else{
      cout << "kyo" << endl;
    }
  }

  return 0;
}