#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, taxi = -1, pizza = -1, girl = -1;
  cin >> n;
  string name;
  vector<string> gname, pname, tname;
  for (int i = 0; i < n; i++) {
    cin >> k;
    cin >> name;
    int t = 0, p = 0, g = 0;
    string str = "";
    for (int j = 0; j < k; j++) {
      cin >> str;
      str.erase(str.begin() + 2);
      str.erase(str.begin() + 4);
      if (str[0] == str[1] && str[1] == str[2] && str[2] == str[3] &&
          str[3] == str[4])
        t++;
      else if (str[0] > str[1] && str[1] > str[2] && str[2] > str[3] &&
               str[3] > str[4] && str[4] > str[5])
        p++;
      else
        g++;
    }
    if (p == pizza) pname.push_back(name);
    if (g == girl) gname.push_back(name);
    if (t == taxi) tname.push_back(name);
    if (p > pizza) {
      pname.clear();
      pname.push_back(name);
      pizza = p;
    }
    if (g > girl) {
      gname.clear();
      gname.push_back(name);
      girl = g;
    }
    if (t > taxi) {
      tname.clear();
      tname.push_back(name);
      taxi = t;
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < tname.size(); i++) {
    cout << tname[i];
    if (i != tname.size() - 1)
      cout << ", ";
    else
      cout << ".\n";
  }
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < pname.size(); i++) {
    cout << pname[i];
    if (i != pname.size() - 1)
      cout << ", ";
    else
      cout << ".\n";
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < gname.size(); i++) {
    cout << gname[i];
    if (i != gname.size() - 1)
      cout << ", ";
    else
      cout << ".\n";
  }
  return 0;
}
