#include <bits/stdc++.h>
using namespace std;
int n, num[101][3];
char name[101][25];
int find(char a[]) {
  int t, p, g;
  t = p = g = 0;
  if (a[0] == a[1] && a[1] == a[3] && a[3] == a[4] && a[4] == a[6] &&
      a[6] == a[7])
    return 0;
  if (a[0] > a[1] && a[1] > a[3] && a[3] > a[4] && a[4] > a[6] && a[6] > a[7])
    return 1;
  return 2;
}
int main() {
  int i, s, maxt, maxp, maxg, f;
  char t[10];
  while (~scanf("%d", &n)) {
    memset(num, 0, sizeof(num));
    for (i = 0; i < n; i++) {
      scanf("%d %s", &s, &name[i]);
      while (s--) {
        scanf("%s", &t);
        int k = find(t);
        num[i][k]++;
      }
    }
    maxt = maxp = maxg = 0;
    for (i = 0; i < n; i++) {
      if (num[i][0] > maxt) maxt = num[i][0];
      if (num[i][1] > maxp) maxp = num[i][1];
      if (num[i][2] > maxg) maxg = num[i][2];
    }
    printf("If you want to call a taxi, you should call: ");
    f = 0;
    for (i = 0; i < n; i++) {
      if (num[i][0] == maxt) {
        if (f)
          printf(", ");
        else
          f = 1;
        printf("%s", name[i]);
      }
    }
    puts(".");
    printf("If you want to order a pizza, you should call: ");
    f = 0;
    for (i = 0; i < n; i++) {
      if (num[i][1] == maxp) {
        if (f)
          printf(", ");
        else
          f = 1;
        printf("%s", name[i]);
      }
    }
    puts(".");
    printf(
        "If you want to go to a cafe with a wonderful girl, you should call: ");
    f = 0;
    for (i = 0; i < n; i++) {
      if (num[i][2] == maxg) {
        if (f)
          printf(", ");
        else
          f = 1;
        printf("%s", name[i]);
      }
    }
    puts(".");
  }
  return 0;
}
