#include <bits/stdc++.h>
using namespace std;
int n;
vector<string> tx;
int t = 0;
vector<string> caf;
int cf = 0;
vector<string> piz;
int pz = 0;
bool T(string& s) {
  if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
      s[6] == s[7])
    return 1;
  else
    return 0;
}
bool P(string& s) {
  if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] && s[6] > s[7])
    return 1;
  else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    string name;
    int k;
    cin >> k >> name;
    int currT = 0;
    int currC = 0;
    int currP = 0;
    for (int j = 0; j < k; j++) {
      string num;
      cin >> num;
      if (T(num))
        currT++;
      else if (P(num))
        currP++;
      else
        currC++;
    }
    if (currT > t) {
      t = currT;
      tx.clear();
      tx.push_back(name);
    } else if (currT == t) {
      tx.push_back(name);
    }
    if (currC > cf) {
      cf = currC;
      caf.clear();
      caf.push_back(name);
    } else if (currC == cf) {
      caf.push_back(name);
    }
    if (currP > pz) {
      pz = currP;
      piz.clear();
      piz.push_back(name);
    } else if (currP == pz) {
      piz.push_back(name);
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < tx.size(); i++) {
    cout << tx[i];
    if (i == tx.size() - 1)
      cout << ".";
    else
      cout << ", ";
  }
  cout << "\n";
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < piz.size(); i++) {
    cout << piz[i];
    if (i == piz.size() - 1)
      cout << ".";
    else
      cout << ", ";
  }
  cout << "\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < caf.size(); i++) {
    cout << caf[i];
    if (i == caf.size() - 1)
      cout << ".";
    else
      cout << ", ";
  }
  return 0;
}
