import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int L = scanner.nextInt(); int D = scanner.nextInt(); System.out.println(new Solver().solve(L, D)); } } class Solver { public String solve(int l, int d) { if (win(l, d)) { return "kado"; } return "matsu"; } Map map = new HashMap<>(); private boolean win(int l, final int d) { if (map.containsKey(l)) return map.get(l); if (l <= 5) { map.put(l, false); return false; } for (int i = 1; i <= l; i++) { for (int j = 1; j <= l; j++) { int k = l - i - j; if (i <= 0 || j <= 0 || k <= 0) continue; if (i == j || i == k || j == k) continue; if (Math.max(i, Math.max(j, k)) - Math.min(i, Math.min(j, k)) > d) continue; if (!win(i, d) & !win(j, d) & !win(k, d)) { map.put(l, true); return true; } } } map.put(l, false); return false; } }