#include <bits/stdc++.h>
using namespace std;
class Frnd {
 public:
  string name;
  int size;
  vector<string> phonebook;
  int count_taxi;
  int count_pizza;
  int count_girls;

 public:
  void set_phonebook(vector<string> str) { phonebook = str; }
  void count() {
    for (int i = 0; i < size; i++) {
      string str;
      bool val1 = 1;
      bool val2 = 1;
      str = phonebook[i];
      for (int i = 0; i < str.size() - 1; i++) {
        if (str[i + 1] != str[i]) {
          val1 = 0;
          break;
        }
      }
      for (int i = 1; i < str.size() - 1; i++) {
        if (str[i + 1] >= str[i]) {
          val2 = 0;
          break;
        }
      }
      if (val1 == 1)
        count_taxi++;
      else if (val2 == 1)
        count_pizza++;
      else
        count_girls++;
    }
  }
};
string split(const string &s, char delim) {
  stringstream ss(s);
  string item;
  string tokens;
  while (getline(ss, item, delim)) {
    tokens += item;
  }
  return tokens;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int mxt = 0;
  int mxp = 0;
  int mxg = 0;
  vector<Frnd> vfrnd(n);
  vector<string> vtx;
  vector<string> vpzz;
  vector<string> vgrl;
  for (int i = 0; i < n; i++) {
    cin >> vfrnd[i].size >> vfrnd[i].name;
    vector<string> v(vfrnd[i].size);
    for (int j = 0; j < vfrnd[i].size; j++) {
      string str;
      cin >> str;
      v[j] = split(str, '-');
    }
    vfrnd[i].set_phonebook(v);
    vfrnd[i].count();
    if (mxt <= vfrnd[i].count_taxi) {
      if (mxt == vfrnd[i].count_taxi)
        vtx.push_back(vfrnd[i].name);
      else {
        vtx.clear();
        mxt = vfrnd[i].count_taxi;
        vtx.push_back(vfrnd[i].name);
      }
    }
    if (mxp <= vfrnd[i].count_pizza) {
      if (mxp == vfrnd[i].count_pizza)
        vpzz.push_back(vfrnd[i].name);
      else {
        vpzz.clear();
        mxp = vfrnd[i].count_pizza;
        vpzz.push_back(vfrnd[i].name);
      }
    }
    if (mxg <= vfrnd[i].count_girls) {
      if (mxg == vfrnd[i].count_girls)
        vgrl.push_back(vfrnd[i].name);
      else {
        vgrl.clear();
        mxg = vfrnd[i].count_girls;
        vgrl.push_back(vfrnd[i].name);
      }
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < vtx.size() - 1; i++) cout << vtx[i] << ", ";
  cout << vtx[vtx.size() - 1] << ".\n";
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < vpzz.size() - 1; i++) cout << vpzz[i] << ", ";
  cout << vpzz[vpzz.size() - 1] << ".\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < vgrl.size() - 1; i++) cout << vgrl[i] << ", ";
  cout << vgrl[vgrl.size() - 1] << ".\n";
  return 0;
}
