#include <bits/stdc++.h>
using namespace std;
struct person {
  string name;
  int taxi, pizza, girl;
  person() : taxi(0), pizza(0), girl(0) {}
};
int f(string s) {
  char q, w, e, r, t, y;
  sscanf(s.c_str(), "%c%c-%c%c-%c%c", &q, &w, &e, &r, &t, &y);
  if (q == w && w == e && e == r && r == t && t == y) return 1;
  if (q > w && w > e && e > r && r > t && t > y) return 2;
  return 3;
}
int main() {
  vector<string> taxi, pizza, girl;
  int maxtaxi = -1, maxpizza = -1, maxgirl = -1;
  string number;
  int n, s;
  cin >> n;
  struct person *p = new struct person[n];
  for (int i = 0; i < n; ++i) {
    cin >> s >> p[i].name;
    for (int j = 0; j < s; ++j) {
      cin >> number;
      switch (f(number)) {
        case 1:
          ++p[i].taxi;
          break;
        case 2:
          ++p[i].pizza;
          break;
        case 3:
          ++p[i].girl;
          break;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    if (p[i].taxi == maxtaxi)
      taxi.push_back(p[i].name);
    else if (p[i].taxi > maxtaxi)
      taxi.clear(), taxi.push_back(p[i].name), maxtaxi = p[i].taxi;
    if (p[i].pizza == maxpizza)
      pizza.push_back(p[i].name);
    else if (p[i].pizza > maxpizza)
      pizza.clear(), pizza.push_back(p[i].name), maxpizza = p[i].pizza;
    if (p[i].girl == maxgirl)
      girl.push_back(p[i].name);
    else if (p[i].girl > maxgirl)
      girl.clear(), girl.push_back(p[i].name), maxgirl = p[i].girl;
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < taxi.size() - 1; ++i) cout << taxi[i] << ", ";
  cout << taxi.back() << ".\n";
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < pizza.size() - 1; ++i) cout << pizza[i] << ", ";
  cout << pizza.back() << ".\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < girl.size() - 1; ++i) cout << girl[i] << ", ";
  cout << girl.back() << ".\n";
  return 0;
}
