#include <bits/stdc++.h>
using namespace std;
int pSet[2000007], c[2000007];
vector<int> vc[2000007];
int n, m, k;
void initSet() {
  for (int i = (1); i <= (n); ++i) pSet[i] = i;
  return;
}
int findSet(int i) { return (pSet[i] == i) ? i : pSet[i] = findSet(pSet[i]); }
void unionSet(int i, int j) {
  pSet[findSet(i)] = findSet(j);
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<string> Taxi, Pizza, Girl;
  int taxis = 0, pizzas = 0, girls = 0;
  for (int i = (1); i <= (n); ++i) {
    int m;
    string s;
    scanf("%d", &m);
    cin >> s;
    int girl = 0, taxi = 0, pizza = 0;
    for (int i = (1); i <= (m); ++i) {
      string str;
      cin >> str;
      if (str[0] == str[1] && str[0] == str[3] && str[0] == str[4] &&
          str[0] == str[6] && str[0] == str[7])
        ++taxi;
      else if (str[0] > str[1] && str[1] > str[3] && str[3] > str[4] &&
               str[4] > str[6] && str[6] > str[7])
        ++pizza;
      else
        ++girl;
    }
    if (girl > girls) girls = girl, Girl.clear();
    if (taxi > taxis) taxis = taxi, Taxi.clear();
    if (pizza > pizzas) pizzas = pizza, Pizza.clear();
    if (girl == girls) Girl.push_back(s);
    if (taxi == taxis) Taxi.push_back(s);
    if (pizza == pizzas) Pizza.push_back(s);
  }
  cout << "If you want to call a taxi, you should call:";
  for (__typeof(Taxi.begin()) it = Taxi.begin(); it != Taxi.end(); ++it) {
    cout << " " << *it;
    if (it + 1 != Taxi.end()) cout << ",";
  }
  puts(".");
  cout << "If you want to order a pizza, you should call:";
  for (__typeof(Pizza.begin()) it = Pizza.begin(); it != Pizza.end(); ++it) {
    cout << " " << *it;
    if (it + 1 != Pizza.end()) cout << ",";
  }
  puts(".");
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (__typeof(Girl.begin()) it = Girl.begin(); it != Girl.end(); ++it) {
    cout << " " << *it;
    if (it + 1 != Girl.end()) cout << ",";
  }
  puts(".");
  return 0;
}
