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 <string>
#include <vector>
#include <algorithm>
#include <cmath>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30
#define EPS 1e-8

using namespace std;

struct Point
{
	double x, y;

	Point(double x=0, double y=0) : x(x), y(y) {}

	double distance (const Point &o) const
	{
		return sqrt((x - o.x) * (x - o.x) + (y - o.y) * (y - o.y));
	}

	Point operator+(const Point &o) const
	{
		return Point(x+o.x, y+o.y);
	}

	Point operator-(const Point &o) const
	{
		return Point(x-o.x, y-o.y);
	}

	Point operator*(const double m) const
	{
		return Point(x*m, y*m);
	}

	Point operator/(const double d) const
	{
		return Point(x/d, y/d);
	}

	double cross(const Point &o) const
	{
		return x * o.y - y * o.x;
	}

	double dot(const Point &o) const
	{
		return x * o.x + y * o.y;
	}

	double atan() const
	{
		return atan2(y, x);
	}

	double norm() const
	{
		return sqrt(dot(*this));
	}

	double area_abs(const Point &a,const Point &b) const
	{
		double t = (a.x - x) * (b.y - y);
		double t2 = (a.y - y) * (b.x - x);
		double areas = abs(t-t2);
		return areas/2;
	}

	//符号付き面積
	double area(const Point &a,const Point &b)
	{
		return ((a.x - x) * (b.y - y)) + ((b.x - x) * (y - a.y));
	}

	//線分abが自身に含まれているのかどうか判断する
	int between(const Point &a,const Point &b)
	{
		if(area(a,b) != 0) return 0;

		if(a.x != b.x)
		{
			return ((a.x <= x) && (x <= b.x) || (a.x >= x) && (x >= b.x));
		}
		else
		{
			return ((a.y <= y) && (y <= b.y) || (a.y >= y) && (y >= b.y));
		}
	}

	double distance_seg(const Point& a,const Point& b)
	{
		if((b-a).dot(*this-a) < EPS)
		{
			return (*this-a).norm();
		}
		if((a-b).dot(*this-b) < EPS)
		{
			return (*this-b).norm();
		}
		return abs((b-a).cross(*this-a)) / (b-a).norm();
	}

	//点a,b,cからなる三角形の中に自身が含まれているかどうか
	bool hitPolygon(const Point& a,const Point& b,const Point& c)
	{
		double t = (b-a).cross(*this-b);
		double t2 = (c-b).cross(*this-c);
		double t3 = (a-c).cross(*this-a);
		if((t > 0 && t2 > 0 && t3 > 0) || ( t < 0 && t2 < 0 && t3 < 0))
		{
			return 1;
		}

		return 0;
	}
};

struct Seg
{
	Point a,b;

	Seg (Point a, Point b) : a(a),b(b) {}

	bool isIntersect(Seg &s)
	{
		if(s.a.between(a,b) || s.b.between(a,b) || a.between(s.a,s.b) || b.between(s.a,s.b))
		{
			return true;
		}

		return ((a-b).cross(s.a-a) * (a-b).cross(s.b-a) < EPS) && ((s.b-s.a).cross(a-s.a)*(s.b-s.a).cross(b-s.a) < EPS);
	}

   	Point getCrossPoint(Seg &s)
	{
		Point p = s.b - s.a;
		double d = abs(p.cross(a-s.a));
		double d2 = abs(p.cross(b-s.a));

		double t = d / (d+d2);
		return a + (b-a)*t;
	}

};

double polygonArea(const vector<Point>& p)
{
    int n = p.size();
    double ret = 0.0;
    for(int i=0; i<n; ++i)
        ret += p[i].cross(p[(i+1)%n]);
    return abs(ret) / 2.0;
}

int main()
{
	double xa,ya,xb,yb;
	while(cin >> xa >> ya >> xb >> yb)
	{
		if(xa == 0 && ya == 0 && xb == 0 && yb == 0) break;

		vector<Seg> v;
		v.push_back(Seg(Point(xa,ya),Point(xb,yb)));

		rep(i,2)
		{
			cin >> xa >> ya >> xb >> yb;
			v.push_back(Seg(Point(xa,ya),Point(xb,yb)));
		}
		
		bool flag = false;
		if(!v[0].isIntersect(v[1])) flag = true;
		if(!v[1].isIntersect(v[2])) flag = true;
		if(!v[2].isIntersect(v[0])) flag = true;

		if(flag) cout << "kyo" << endl;
		else
		{
			vector<Point> p;
			rep(i,3)
			{
				p.push_back(v[i].getCrossPoint(v[(i+1)%3]));
			}

			double ret = polygonArea(p);
			if(ret >= 1900000.0)
			{
				cout << "dai-kichi" << endl;
			}
			else if(ret >= 1000000.0)
			{
				cout << "chu-kichi" << endl;
			}
			else if(ret >= 100000.0)
			{
				cout << "kichi" << endl;
			}
			else if(ret > EPS)
			{
				cout << "syo-kichi" << endl;
			} 
			else cout << "kyo" << endl;
		}
	}	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

#define INF 1e99
#define EPS 1e-7

typedef complex<double> point;
typedef const point &ppoint;

double cross(ppoint a, ppoint b) {
	return a.real() * b.imag() - a.imag() * b.real();
}

double intersect(point pa1, point pa2, point pb1, point pb2) {
	point difa = pa2 - pa1;
	point difb = pb2 - pb1;
	point difab1 = pb1 - pa1;

	double D = cross(difa, -difb);

	if (abs(D) > EPS) {
		double t = cross(difab1, -difb) / D;
		double s = cross(difa, difab1) / D;

		if (t >= 0.0 && t <= 1.0 && s >= 0.0 && s <= 1.0) {
			return t;
		}
	}
	return INF;
}

int main() {
	point s[3], f[3], z[3];
	int x1, x2, y1, y2;

	while (true) {
		for (int i = 0; i < 3; ++i) {
			if (scanf("%d%d%d%d", &x1, &y1, &x2, &y2) != 4) {
				return 0;
			}
			s[i] = point(x1, y1);
			f[i] = point(x2, y2);
		}

		int j;
		for (j = 0; j < 3; ++j) {
			double t = intersect(s[j], f[j], s[(j + 1) % 3], f[(j + 1) % 3]);
			if (t == INF) {
				puts("kyo");
				break;
			}

			z[j] = (1.0 - t) * s[j] + t * f[j];
		}

		if (j == 3) {
			double s = abs(cross(z[1] - z[0], z[2] - z[0])) * 0.5;

			if (s >= 1.9e6) {
				puts("dai-kichi");
			} else if (s >= 1e6) {
				puts("chu-kichi");
			} else if (s >= 1e5) {
				puts("kichi");
			} else if (s > EPS) {
				puts("syo-kichi");
			} else {
				puts("kyo");
			}
		}
	}
}