#include <bits/stdc++.h>
typedef struct covek {
  char ime[30];
  int maxp;
  int maxg;
  int maxt;
} covek;
int main() {
  int lmaxt = 0, lmaxp = 0, lmaxg = 0;
  int bmaxt = 0, bmaxp = 0, bmaxg = 0;
  covek ljudi[101] = {};
  char s[100];
  int n, i, brtel, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %s", &brtel, &ljudi[i].ime);
    gets(s);
    for (j = 1; j <= brtel; j++) {
      gets(s);
      if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
          s[6] == s[7])
        ljudi[i].maxt++;
      else {
        if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
            s[6] > s[7])
          ljudi[i].maxp++;
        else
          ljudi[i].maxg++;
      }
    }
    if (ljudi[i].maxt > lmaxt) {
      bmaxt = 1;
      lmaxt = ljudi[i].maxt;
    } else if (ljudi[i].maxt == lmaxt)
      bmaxt++;
    if (ljudi[i].maxp > lmaxp) {
      bmaxp = 1;
      lmaxp = ljudi[i].maxp;
    } else if (ljudi[i].maxp == lmaxp)
      bmaxp++;
    if (ljudi[i].maxg > lmaxg) {
      bmaxg = 1;
      lmaxg = ljudi[i].maxg;
    } else if (ljudi[i].maxg == lmaxg)
      bmaxg++;
  }
  for (i = 1; i <= 3; i++) {
    if (i == 1) {
      printf("If you want to call a taxi, you should call: ");
      for (j = 1; j <= n; j++) {
        if (bmaxt == 0) break;
        if (ljudi[j].maxt == lmaxt) {
          bmaxt--;
          printf("%s", ljudi[j].ime);
          if (bmaxt)
            printf(", ");
          else
            printf(".\n");
        }
      }
    }
    if (i == 2) {
      printf("If you want to order a pizza, you should call: ");
      for (j = 1; j <= n; j++) {
        if (bmaxp == 0) break;
        if (ljudi[j].maxp == lmaxp) {
          bmaxp--;
          printf("%s", ljudi[j].ime);
          if (bmaxp)
            printf(", ");
          else
            printf(".\n");
        }
      }
    }
    if (i == 3) {
      printf(
          "If you want to go to a cafe with a wonderful girl, you should "
          "call: ");
      for (j = 1; j <= n; j++) {
        if (bmaxg == 0) break;
        if (ljudi[j].maxg == lmaxg) {
          bmaxg--;
          printf("%s", ljudi[j].ime);
          if (bmaxg)
            printf(", ");
          else
            printf(".\n");
        }
      }
    }
  }
  return 0;
}
