https://www.acmicpc.net/problem/16431
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int br=s.nextInt(), bc=s.nextInt();
int dr=s.nextInt(), dc=s.nextInt();
int lr=s.nextInt(), lc=s.nextInt();
int m=Math.min(Math.abs(lr-br),Math.abs(lc-bc));
int sum=Math.abs(lr-br)+Math.abs(lc-bc)-m;
int sum1=Math.abs(lr-dr)+Math.abs(lc-dc);
if(sum>sum1) System.out.print("daisy");
else if(sum<sum1) System.out.print("bessie");
else System.out.print("tie");
}
}