#include <bits/stdc++.h>
using namespace std;
int s[105];
int tpg[105][3];
char name[105][30];
int numtype(char *num);
int main() {
  int N;
  scanf("%d", &N);
  int i, j;
  int mtpg[3] = {0};
  char phone[10];
  for (i = 0; i < N; i++) {
    scanf("%d %s", s + i, &name[i]);
    for (j = 0; j < s[i]; j++) {
      scanf("%s", phone);
      tpg[i][numtype(phone)]++;
    }
  }
  memset(mtpg, -1, sizeof(mtpg));
  for (i = 0; i < N; i++) {
    for (j = 0; j < 3; j++) {
      if (tpg[i][j] > mtpg[j]) mtpg[j] = tpg[i][j];
    }
  }
  char str[3][100] = {
      "If you want to call a taxi, you should call: ",
      "If you want to order a pizza, you should call: ",
      "If you want to go to a cafe with a wonderful girl, you should call: "};
  int cc = 0;
  for (j = 0; j < 3; j++) {
    if (cc != 0) printf(".\n");
    cc = 0;
    cout << str[j];
    for (i = 0; i < N; i++) {
      if (tpg[i][j] == mtpg[j]) {
        if (cc != 0) printf(", ");
        printf("%s", name[i]);
        cc++;
      }
    }
  }
  if (cc != 0) printf(".");
  printf("\n");
  return 0;
}
int numtype(char *num) {
  if (num[0] == num[1] && num[0] == num[3] && num[0] == num[4] &&
      num[0] == num[6] && num[0] == num[7])
    return 0;
  if (num[0] > num[1] && num[1] > num[3] && num[3] > num[4] &&
      num[4] > num[6] && num[6] > num[7])
    return 1;
  return 2;
}
