#include <bits/stdc++.h>
using namespace std;
char s1[10000][100], s2[10000];
int taxi[10000], pizza[9999], girl[9999], str_taxi[10000], str_pizza[9999],
    str_girl[9999];
int main() {
  int a, b, c, d, e, f, t, i, j, ta, gi, pi;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    scanf("%d %s", &a, &s1[i]);
    ta = pi = gi = 0;
    for (j = 1; j <= a; j++) {
      scanf("%s", s2);
      if (s2[0] == s2[1] && s2[1] == s2[3] && s2[3] == s2[4] &&
          s2[4] == s2[6] && s2[6] == s2[7]) {
        ta++;
      } else if (s2[0] > s2[1] && s2[1] > s2[3] && s2[3] > s2[4] &&
                 s2[4] > s2[6] && s2[6] > s2[7]) {
        pi++;
      } else {
        gi++;
      }
    }
    taxi[i] = ta;
    str_taxi[i] = ta;
    pizza[i] = pi;
    str_pizza[i] = pi;
    girl[i] = gi;
    str_girl[i] = gi;
  }
  sort(str_taxi, str_taxi + t);
  sort(str_pizza, str_pizza + t);
  sort(str_girl, str_girl + t);
  a = str_taxi[t - 1];
  b = str_pizza[t - 1];
  c = str_girl[t - 1];
  ta = gi = pi = 0;
  printf("If you want to call a taxi, you should call:");
  for (i = 0; i < t; i++) {
    if (a == taxi[i]) {
      if (ta == 1) {
        printf(", %s", s1[i]);
      } else {
        printf(" %s", s1[i]);
        ta = 1;
      }
    }
  }
  printf(".\n");
  printf("If you want to order a pizza, you should call:");
  for (i = 0; i < t; i++) {
    if (b == pizza[i]) {
      if (pi == 1) {
        printf(", %s", s1[i]);
      } else {
        printf(" %s", s1[i]);
        pi = 1;
      }
    }
  }
  printf(".\n");
  printf("If you want to go to a cafe with a wonderful girl, you should call:");
  for (i = 0; i < t; i++) {
    if (c == girl[i]) {
      if (gi == 1) {
        printf(", %s", s1[i]);
      } else {
        printf(" %s", s1[i]);
        gi = 1;
      }
    }
  }
  printf(".\n");
  return 0;
}
