#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<string> name;
  vector<int> taxi;
  vector<int> pizza;
  vector<int> girl;
  int n;
  cin >> n;
  while (n--) {
    int m;
    string s;
    cin >> m >> s;
    int t = 0, p = 0, g = 0;
    for (int i = 0; i < m; i++) {
      string v;
      cin >> v;
      if (v[0] == v[1] && v[1] == v[3] && v[3] == v[4] && v[4] == v[6] &&
          v[6] == v[7])
        t++;
      else if (v[0] > v[1] && v[1] > v[3] && v[3] > v[4] && v[4] > v[6] &&
               v[6] > v[7])
        p++;
      else
        g++;
    }
    name.push_back(s);
    taxi.push_back(t);
    pizza.push_back(p);
    girl.push_back(g);
  }
  int max = taxi[0];
  vector<string> ans;
  for (int i = 0; i < taxi.size(); i++) {
    if (taxi[i] > max) {
      max = taxi[i];
    }
  }
  for (int i = 0; i < taxi.size(); i++) {
    if (taxi[i] == max) ans.push_back(name[i]);
  }
  if (ans.size() == 1)
    cout << "If you want to call a taxi, you should call: " << ans[0] << ".";
  else {
    cout << "If you want to call a taxi, you should call: ";
    for (int i = 0; i < ans.size() - 1; i++) cout << ans[i] << ", ";
    cout << ans[ans.size() - 1] << ".";
  }
  cout << "\n";
  ans.clear();
  max = pizza[0];
  for (int i = 0; i < pizza.size(); i++) {
    if (pizza[i] > max) {
      max = pizza[i];
    }
  }
  for (int i = 0; i < pizza.size(); i++) {
    if (pizza[i] == max) ans.push_back(name[i]);
  }
  if (ans.size() == 1)
    cout << "If you want to order a pizza, you should call: " << ans[0] << ".";
  else {
    cout << "If you want to order a pizza, you should call: ";
    for (int i = 0; i < ans.size() - 1; i++) cout << ans[i] << ", ";
    cout << ans[ans.size() - 1] << ".";
  }
  cout << "\n";
  ans.clear();
  max = girl[0];
  for (int i = 0; i < girl.size(); i++) {
    if (girl[i] > max) {
      max = girl[i];
    }
  }
  for (int i = 0; i < girl.size(); i++) {
    if (girl[i] == max) ans.push_back(name[i]);
  }
  if (ans.size() == 1)
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call: "
         << ans[0] << ".";
  else {
    cout << "If you want to go to a cafe with a wonderful girl, you should "
            "call: ";
    for (int i = 0; i < ans.size() - 1; i++) cout << ans[i] << ", ";
    cout << ans[ans.size() - 1] << ".";
  }
  cout << "\n";
}
