#include <bits/stdc++.h>
using namespace std;
struct person {
  string name;
  int a, b, c;
} p[110];
int n, m;
char nn[110];
int x, y, z;
int check_taxi(int x, int y, int z) {
  if (x / 10 == x % 10 && y / 10 == y % 10 && z / 10 == z % 10) {
    if (x % 10 == y % 10 && y % 10 == z % 10 && x % 10 == z % 10) {
      return 1;
    }
  }
  return 0;
}
int check_pizza(int x, int y, int z) {
  int a = x / 10, b = x % 10;
  int c = y / 10, d = y % 10;
  int e = z / 10, f = z % 10;
  if (a > b && b > c && c > d && d > e && e > f) {
    return 1;
  }
  return 0;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%s", &m, nn);
    p[i].name = string(nn);
    p[i].a = p[i].b = p[i].c = 0;
    for (j = 0; j < m; j++) {
      scanf("%d-%d-%d", &x, &y, &z);
      if (check_taxi(x, y, z)) {
        p[i].a++;
      } else if (check_pizza(x, y, z)) {
        p[i].b++;
      } else
        p[i].c++;
    }
  }
  int maxd = -1, first = 1;
  for (i = 0; i < n; i++) {
    if (p[i].a > maxd) maxd = p[i].a;
  }
  printf("If you want to call a taxi, you should call: ");
  for (i = 0; i < n; i++) {
    if (p[i].a == maxd) {
      if (!first) {
        printf(", ");
      }
      printf("%s", p[i].name.c_str());
      first = 0;
    }
  }
  printf(".\n");
  maxd = -1, first = 1;
  for (i = 0; i < n; i++) {
    if (p[i].b > maxd) maxd = p[i].b;
  }
  printf("If you want to order a pizza, you should call: ");
  for (i = 0; i < n; i++) {
    if (p[i].b == maxd) {
      if (!first) {
        printf(", ");
      }
      printf("%s", p[i].name.c_str());
      first = 0;
    }
  }
  printf(".\n");
  maxd = -1, first = 1;
  for (i = 0; i < n; i++) {
    if (p[i].c > maxd) maxd = p[i].c;
  }
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: ");
  for (i = 0; i < n; i++) {
    if (p[i].c == maxd) {
      if (!first) {
        printf(", ");
      }
      printf("%s", p[i].name.c_str());
      first = 0;
    }
  }
  printf(".\n");
  return 0;
}
