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 <cmath>
using namespace std;

struct Point { double x, y; };

int crs(double x1, double y1, double x2, double y2) {
    double z = x1 * y2 - y1 * x2;
    return (0 < z ? 1 : (z < 0 ? -1 : 0));
}

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

Point intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) {
    if (x3 == x4) {
        swap(x1, x3); swap(y1, y3); swap(x2, x4); swap(y2, y4);
    }
    double x, y, a, b, c, d;
    if (x1 == x2) {
        c = (y4 - y3) / (x4 - x3);
        d = y3 - c * x3;
        x = x1;
        y = c * x + d;
    } 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;
    }
    return (Point){x, y};
}

int main() {
    int x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6;
    while (cin >> x1 >> y1 >> x2 >> y2, (x1 || y1 || x2 || y2)) {
        cin >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
        if ( ! intersect(x1, y1, x2, y2, x3, y3, x4, y4) ||
             ! intersect(x3, y3, x4, y4, x5, y5, x6, y6) ||
             ! intersect(x5, y5, x6, y6, x1, y1, x2, y2)) {
            cout << "kyo" << endl;
        } else {
            Point p1 = intersection(x1, y1, x2, y2, x3, y3, x4, y4);
            Point p2 = intersection(x3, y3, x4, y4, x5, y5, x6, y6);
            Point p3 = intersection(x5, y5, x6, y6, x1, y1, x2, y2);
            double area = abs((p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x)) / 2.0;
            if (area < 0.00000001)
                cout << "kyo" << endl;
            else if (1899999.99999999 < area)
                cout << "dai-kichi" << endl;
            else if (999999.99999999 < area)
                cout << "chu-kichi" << endl;
            else if (99999.99999999 < area)
                cout << "kichi" << endl;
            else
                cout << "syo-kichi" << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
using namespace std;

typedef complex<double> P;
typedef pair<P,P> L;
const double EPS = 1e-8;

double dot(P a, P b){ return real(conj(a)*b);}
double cross(P a, P b){ return imag(conj(a)*b);}

int ccw(P a, P b, P c){
    c -= a;
    b -= a;
    if(cross(b, c) > EPS) return 1;
    if(cross(b, c) < -EPS) return -1;
    if(dot(b,c) < -EPS) return 2;
    if(norm(b) < norm(c)) return -2;
    return 0;
}

bool isIntersect(L s1, L s2){
    return ( ccw(s1.first,s1.second,s2.first) * ccw(s1.first,s1.second,s2.second) <= 0 &&
             ccw(s2.first,s2.second,s2.first) * ccw(s2.first,s2.second,s1.second) <= 0);
}

P crossPoint(L l, L m){
    double A = cross(l.second - l.first, m.second - m.first);
    double B = cross(l.second - l.first, l.second - m.first);
    if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
    else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}

double area(vector<P> v){
    double sum = 0.0;
    int n = v.size();
    for(int i=0;i<n;i++) sum += (real(v[i]) - real(v[(i+1)%n])) * (imag(v[i]) + imag(v[(i+1)%n]));
    return fabs(sum / 2.0);
}

string ans(vector<P> v){
    double a = area(v);
    if(a < EPS) return "kyo";
    if(a < 100000.0) return "syo-kichi";
    if(a < 1000000.0) return "kichi";
    if(a < 1900000.0) return "chu-kichi";
    return "dai-kichi";
}

int main(){
    double x1,y1,x2,y2;
    while(cin >> x1 >> y1 >> x2 >> y2 && (x1||y1||x2||y2)){
        L v[3];
        vector<P> p(3);
        bool f = false;
        v[0] = L(P(x1,y1),P(x2,y2));
        for(int i=1;i<3;i++) {
            cin >> x1 >> y1 >> x2 >> y2;
            v[i] = L(P(x1,y1),P(x2,y2));
            if(!isIntersect(v[0],v[i])) f = true;
            else p[i-1] = crossPoint(v[0],v[i]);
        }
        if(!isIntersect(v[1],v[2])) f = true;
        else p[2] = crossPoint(v[1],v[2]);

        for(int i=0;i<3;i++){
            for(int j=i+1;j<3;j++){
                if(abs(p[i]-p[j]) < EPS) f = true;
            }
        }

        if(f) cout << "kyo" << endl;
        else cout << ans(p) << endl;
    }
}