#include <bits/stdc++.h>
using namespace std;
int n, m;
struct entry {
  char name[25];
  int taxi, girls, pizza;
  entry() : taxi(0), girls(0), pizza(0) {}
} A[100], temp[100];
inline bool istaxi(char* S) {
  for (int i = 1; i < 8; i++) {
    if (S[i] == '-')
      continue;
    else if (S[i] != S[0])
      return 0;
  }
  return 1;
}
inline bool ispizza(char* S) {
  for (int i = 1, last = 0; i < 8; i++) {
    if (S[i] == '-')
      continue;
    else {
      if (S[i] >= S[last]) return 0;
      last = i;
    }
  }
  return 1;
}
bool compare_taxi(entry a, entry b) { return a.taxi > b.taxi; }
bool compare_pizza(entry a, entry b) { return a.pizza > b.pizza; }
bool compare_girls(entry a, entry b) { return a.girls > b.girls; }
int main() {
  scanf("%d", &n);
  char number[10];
  for (int i = 0; i < n; i++) {
    scanf("%d %s", &m, A[i].name);
    for (int j = 0; j < m; j++) {
      scanf("%s", number);
      if (istaxi(number))
        A[i].taxi++;
      else if (ispizza(number))
        A[i].pizza++;
      else
        A[i].girls++;
    }
  }
  memcpy(temp, A, sizeof(A[0]) * n);
  stable_sort(temp, temp + n, compare_taxi);
  printf("If you want to call a taxi, you should call:");
  for (int i = 0; i < n && temp[i].taxi == temp[0].taxi; i++) {
    printf(" %s", temp[i].name);
    if (i + 1 < n && temp[i + 1].taxi == temp[0].taxi) printf(",");
  }
  printf(".\n");
  memcpy(temp, A, sizeof(A[0]) * n);
  stable_sort(temp, temp + n, compare_pizza);
  printf("If you want to order a pizza, you should call:");
  for (int i = 0; i < n && temp[i].pizza == temp[0].pizza; i++) {
    printf(" %s", temp[i].name);
    if (i + 1 < n && temp[i + 1].pizza == temp[0].pizza) printf(",");
  }
  printf(".\n");
  memcpy(temp, A, sizeof(A[0]) * n);
  stable_sort(temp, temp + n, compare_girls);
  printf("If you want to go to a cafe with a wonderful girl, you should call:");
  for (int i = 0; i < n && temp[i].girls == temp[0].girls; i++) {
    printf(" %s", temp[i].name);
    if (i + 1 < n && temp[i + 1].girls == temp[0].girls) printf(",");
  }
  printf(".");
  return 0;
}
