#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<pair<string, tuple<int, int, int>>> v;
  for (int x = 0; x < n; x++) {
    int num;
    string s;
    cin >> num >> s;
    int taxi = 0, pizza = 0, girl = 0;
    for (int y = 0; y < num; y++) {
      string z;
      cin >> z;
      if (z[0] == z[1] && z[0] == z[3] && z[0] == z[4] && z[0] == z[6] &&
          z[0] == z[7])
        taxi++;
      else if (z[0] > z[1] && z[1] > z[3] && z[3] > z[4] && z[4] > z[6] &&
               z[6] > z[7])
        pizza++;
      else
        girl++;
    }
    tuple<int, int, int> t = {taxi, pizza, girl};
    v.emplace_back(s, t);
  }
  int maxitaxi = 0;
  int maxigirl = 0;
  int maxipizzaa = 0;
  for (int x = 0; x < v.size(); x++) {
    if (get<0>(v[x].second) > maxitaxi) maxitaxi = get<0>(v[x].second);
    if (get<1>(v[x].second) > maxipizzaa) maxipizzaa = get<1>(v[x].second);
    if (get<2>(v[x].second) > maxigirl) maxigirl = get<2>(v[x].second);
  }
  vector<string> besttaxi;
  vector<string> bestgirl;
  vector<string> bestpizza;
  for (int x = 0; x < v.size(); x++) {
    if (get<0>(v[x].second) == maxitaxi) besttaxi.push_back(v[x].first);
    if (get<1>(v[x].second) == maxipizzaa) bestpizza.push_back(v[x].first);
    if (get<2>(v[x].second) == maxigirl) bestgirl.push_back(v[x].first);
  }
  cout << "If you want to call a taxi, you should call:";
  for (int x = 0; x < besttaxi.size(); x++) {
    if (x == 0) {
      cout << " " << besttaxi[x];
    } else {
      cout << ", " << besttaxi[x];
    }
  }
  cout << ".\n";
  cout << "If you want to order a pizza, you should call:";
  for (int x = 0; x < bestpizza.size(); x++) {
    if (x == 0) {
      cout << " " << bestpizza[x];
    } else {
      cout << ", " << bestpizza[x];
    }
  }
  cout << ".\n";
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (int x = 0; x < bestgirl.size(); x++) {
    if (x == 0) {
      cout << " " << bestgirl[x];
    } else {
      cout << ", " << bestgirl[x];
    }
  }
  cout << ".";
  return 0;
}
