#include <bits/stdc++.h>
using namespace std;
void print(int x) { cerr << x; }
void print(long long x) { cerr << x; }
void print(double x) { cerr << x; }
void print(char x) { cerr << x; }
void print(string x) { cerr << x; }
template <class T>
void print(vector<T> v) {
  cerr << "[ ";
  for (T i : v) {
    print(i);
    cerr << " ";
  }
  cerr << "]";
}
template <class T>
void print(set<T> v) {
  cerr << "[ ";
  for (T i : v) {
    print(i);
    cerr << " ";
  }
  cerr << "]";
}
template <class T, class V>
void print(map<T, V> v) {
  cerr << endl << "[ \n";
  for (auto i = v.begin(); i != v.end(); i++) {
    print(i->first);
    cerr << " ";
    print(i->second);
    cerr << endl;
  }
  cerr << "]";
}
struct phone {
  string name;
  int girls = 0;
  int pizza = 0;
  int taxi = 0;
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, i, j, k;
  cin >> n;
  struct phone phonebook[n];
  vector<int> mgirls, mpizza, mtaxi;
  for (i = 0; i < n; i++) {
    cin >> a;
    string s;
    cin >> s;
    phonebook[i].name = s;
    for (j = 0; j < a; j++) {
      string s1;
      cin >> s1;
      map<char, int> m;
      vector<int> vec, vec1;
      for (k = 0; k < s1.size(); k++) {
        if (s1[k] != '-') {
          m[s1[k]]++;
          vec.push_back(s1[k] - '0');
        }
      }
      if (m.size() == 1)
        phonebook[i].taxi++;
      else {
        bool check = false;
        for (k = 1; k < 6; k++) {
          if (vec[k] >= vec[k - 1]) {
            check = true;
            break;
          }
        }
        if (check)
          phonebook[i].girls++;
        else
          phonebook[i].pizza++;
      }
    }
    mgirls.push_back(phonebook[i].girls);
    mpizza.push_back(phonebook[i].pizza);
    mtaxi.push_back(phonebook[i].taxi);
  }
  int g_m, p_m, t_m;
  t_m = *max_element(mtaxi.begin(), mtaxi.end());
  p_m = *max_element(mpizza.begin(), mpizza.end());
  g_m = *max_element(mgirls.begin(), mgirls.end());
  vector<string> ans_t, ans_p, ans_g;
  for (i = 0; i < n; i++) {
    if (t_m == phonebook[i].taxi) ans_t.push_back(phonebook[i].name);
    if (p_m == phonebook[i].pizza) ans_p.push_back(phonebook[i].name);
    if (g_m == phonebook[i].girls) ans_g.push_back(phonebook[i].name);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (i = 0; i < ans_t.size(); i++) {
    if (i != ans_t.size() - 1) {
      cout << ans_t[i] << ", ";
      continue;
    }
    cout << ans_t[i] << ".\n";
  }
  cout << "If you want to order a pizza, you should call: ";
  for (i = 0; i < ans_p.size(); i++) {
    if (i != ans_p.size() - 1) {
      cout << ans_p[i] << ", ";
      continue;
    }
    cout << ans_p[i] << ".\n";
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (i = 0; i < ans_g.size(); i++) {
    if (i != ans_g.size() - 1) {
      cout << ans_g[i] << ", ";
      continue;
    }
    cout << ans_g[i] << ".\n";
  }
  return 0;
}
