#include <bits/stdc++.h>
using namespace std;
struct XD {
  int nums;
  char name[1000];
  int taxi;
  int pizza;
  int other;
} data[110];
pair<int, int> tp, pp, op;
int main(void) {
  int N;
  int t1, t2, t3;
  scanf("%d", &N);
  getchar();
  for (int i = 0; i < 105; i++)
    data[i].taxi = data[i].pizza = data[i].other = 0;
  tp.first = pp.first = op.first = 0;
  for (int i = 0; i < N; i++) {
    scanf("%d%s", &data[i].nums, data[i].name);
    for (int j = 0; j < data[i].nums; j++) {
      scanf("%d-%d-%d", &t1, &t2, &t3);
      if (t1 == t2 && t2 == t3) {
        int a, b, c, d, e, f;
        a = t1 / 10, b = t2 / 10, c = t3 / 10;
        d = t1 % 10, e = t2 % 10, f = t3 % 10;
        if (a == d && b == e && c == f && a == b && b == c) {
          data[i].taxi++;
          continue;
        }
      }
      int temp[20];
      for (int i = 0; i < 15; i++) temp[i] = 0;
      if (t1 > t2 && t2 > t3) {
        int a, b, c, d, e, f;
        a = t1 / 10, b = t2 / 10, c = t3 / 10;
        d = t1 % 10, e = t2 % 10, f = t3 % 10;
        temp[a] = temp[b] = temp[c] = temp[d] = temp[e] = temp[f] = 1;
        int test = 0;
        for (int i = 0; i < 10; i++)
          if (temp[i]) test++;
        if (test == 6 && a > d && d > b && b > e && e > c && c > f) {
          data[i].pizza++;
          continue;
        }
      }
      data[i].other++;
    }
    if (data[i].taxi > tp.first) {
      tp.first = data[i].taxi;
      tp.second = i;
    }
    if (data[i].pizza > pp.first) {
      pp.first = data[i].pizza;
      pp.second = i;
    }
    if (data[i].other > op.first) {
      op.first = data[i].other;
      op.second = i;
    }
  }
  int flag = 0;
  printf("If you want to call a taxi, you should call: ");
  for (int i = 0; i < N; i++) {
    if (data[i].taxi == tp.first) {
      if (flag) printf(", ");
      flag = 1;
      printf("%s", data[i].name);
    }
  }
  puts(".");
  flag = 0;
  printf("If you want to order a pizza, you should call: ");
  for (int i = 0; i < N; i++) {
    if (data[i].pizza == pp.first) {
      if (flag) printf(", ");
      flag = 1;
      printf("%s", data[i].name);
    }
  }
  puts(".");
  flag = 0;
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: ");
  for (int i = 0; i < N; i++) {
    if (data[i].other == op.first) {
      if (flag) printf(", ");
      flag = 1;
      printf("%s", data[i].name);
    }
  }
  puts(".");
  return 0;
}
