#include <bits/stdc++.h>
#pragma warning(disable : 4786)
#pragma comment(linker, "/STACK:16777216")
using namespace std;
char a[110][110][10];
char name[100];
int num[110];
int girl[110];
int taxi[110];
int pizza[110];
int N;
int max(int a, int b) { return a > b ? a : b; }
int check(char str[10]) {
  char temp[10], fl;
  int i;
  temp[0] = str[0];
  temp[1] = str[1];
  temp[2] = str[3];
  temp[3] = str[4];
  temp[4] = str[6];
  temp[5] = str[7];
  temp[6] = NULL;
  fl = 2;
  for (i = 1; i < 6; i++) {
    if (temp[i] != temp[i - 1]) {
      fl = 0;
      break;
    }
  }
  if (fl == 2) return 2;
  fl = 1;
  for (i = 1; i < 6; i++) {
    if (temp[i] >= temp[i - 1]) {
      fl = 0;
      break;
    }
  }
  if (fl == 1) return 1;
  return 0;
}
map<int, string> M;
int main() {
  int i, j, k, gl, tax, piz;
  string nick;
  while (scanf("%d", &N) == 1) {
    M.clear();
    for (i = 0; i < 100; i++) {
      girl[i] = 0;
      taxi[i] = 0;
      pizza[i] = 0;
    }
    for (i = 0; i < N; i++) {
      scanf("%d %s", &num[i], name);
      M[i] = name;
      for (j = 0; j < num[i]; j++) {
        scanf("%s", a[i][j]);
        k = check(a[i][j]);
        if (k == 2)
          taxi[i]++;
        else if (k == 1)
          pizza[i]++;
        else
          girl[i]++;
      }
    }
    gl = 0, tax = 0, piz = 0;
    for (i = 0; i < N; i++) {
      gl = max(gl, girl[i]);
      tax = max(tax, taxi[i]);
      piz = max(piz, pizza[i]);
    }
    k = 0;
    printf("If you want to call a taxi, you should call:");
    for (i = 0; i < N; i++) {
      if (taxi[i] == tax) {
        nick = M[i];
        if (k == 0) {
          k = 1;
          cout << " " << nick;
        } else {
          cout << ", " << nick;
        }
      }
    }
    printf(".\n");
    k = 0;
    printf("If you want to order a pizza, you should call:");
    for (i = 0; i < N; i++) {
      if (pizza[i] == piz) {
        nick = M[i];
        if (k == 0) {
          k = 1;
          cout << " " << nick;
        } else {
          cout << ", " << nick;
        }
      }
    }
    printf(".\n");
    k = 0;
    printf(
        "If you want to go to a cafe with a wonderful girl, you should call:");
    for (i = 0; i < N; i++) {
      if (girl[i] == gl) {
        nick = M[i];
        if (k == 0) {
          k = 1;
          cout << " " << nick;
        } else {
          cout << ", " << nick;
        }
      }
    }
    printf(".\n");
  }
  return 0;
}
