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 <cassert>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]
typedef complex<double> P;
typedef long long int Int;
const Int N = 3;
const double EPS = 1e-8;

struct L : public vector<P> {
  L(){}
  L(const P &a, const P &b) {
    push_back(a); push_back(b);
  }
};
typedef vector<P> G;

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

Int ccw(P a, P b, P c) {
  b -= a; c -= a;
  if (cross(b, c) > 0)   return +1;       // counter clockwise
  if (cross(b, c) < 0)   return -1;       // clockwise
  if (dot(b, c) < 0)     return +2;       // c--a--b on line
  if (norm(b) < norm(c)) return -2;       // a--b--c on line
  return 0;
}

bool intersectSS(const L &s, const L &t) {
  return ccw(s[0],s[1],t[0])*ccw(s[0],s[1],t[1]) <= 0 &&
    ccw(t[0],t[1],s[0])*ccw(t[0],t[1],s[1]) <= 0;
}

pair<bool, P> crosspointLL(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return pair<bool, P>(0, m[0]); // same line
  if (abs(A) < EPS) assert(false); // !!!PRECONDITION NOT SATISFIED!!!
  return pair<bool, P>(1, m[0] + B / A * (m[1] - m[0]));
}

bool input(L &l){
  Int x1, y1, x2, y2; cin >>x1 >>y1 >>x2 >>y2;
  l = L(P(x1, y1), P(x2, y2));
  return (x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0);
}

double area(const G &P) {
  double A = 0.0;
  for (Int i = 0; i < P.size(); ++i) A += cross(curr(P, i), next(P, i));
  return abs(A / 2.0);
}

string solve(L ls[N]){
  G g;
  REP(i, N){
    if(!intersectSS(ls[i], ls[(i + 1) % N])) return "kyo";
    else{
      pair<bool, P> res = crosspointLL(ls[i], ls[(i + 1) % N]);
      if(!res.first) return "kyo";
      g.push_back(res.second);
    }
  }
  double r = area(g);
  if(r > 0 && r < 100000) return "syo-kichi";
  else if(r < 1000000) return "kichi";
  else if(r < 1900000) return "chu-kichi";
  return "dai-kichi";
}

int main() {
  L ls[N];
  while(input(ls[0])){
    FOR(i, 1, N) input(ls[i]);
    cout <<solve(ls) <<endl;
  }
  return 0;
}

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

typedef complex<double> P;
#define EPS (1e-10)

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

int is_intersected_ls(P a1,P a2,P b1,P b2){
	return cross(a2-a1,b1-a1)*cross(a2-a1,b2-a1) < EPS &&
		cross(b2-b1,a1-b1)*cross(b2-b1,a2-b1) < EPS;
}

P intersection_ls(P a1,P a2,P b1,P b2){
	P b = b2 - b1;
	double d1 = abs(cross(b,a1-b1));
	double d2 = abs(cross(b,a2-b1));
	double t = d1 / (d1 + d2);
	return a1 + (a2 - a1) * t;
}

double polygon_area(int n, P p[]){
	double s = cross(p[n-1],p[0]);
	for(int i=0;i<n-1;i++) s += cross(p[i],p[i+1]); 
	return fabs(s) / 2;
}

int main(void){
	while(1){
		double s=0;
		P l[3][2],p[3];

		for(int i=0;i<3;i++){
			if(!(cin>>l[i][0].real()>>l[i][0].imag()>>l[i][1].real()>>l[i][1].imag())) return 0;
		}

		for(int i=0;i<3;i++){
			int j = (i + 1) % 3;
			if(is_intersected_ls(l[i][0],l[i][1],l[j][0],l[j][1])){
				p[i] = intersection_ls(l[i][0],l[i][1],l[j][0],l[j][1]);
			}
			else{
				s = -1;
				break;
			}
		}

		if(s == 0){
			s = polygon_area(3,p);
			if(s >= 1900000) cout<<"dai-kichi\n";
			else if(s >= 1000000) cout<<"chu-kichi\n";
			else if(s >= 100000) cout<<"kichi\n";
			else cout<<"syo-kichi\n";
		}
		else{
			cout<<"kyo\n";
		}
	}

	return 0;
}