#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> girls;
  vector<int> pizza;
  vector<int> taxi;
  vector<string> v;
  while (n--) {
    int k;
    string s, t;
    cin >> k >> s;
    int p = 0, ta = 0, g = 0;
    for (int f = 0; f < k; f++) {
      cin >> t;
      if (t[0] > t[1] && t[1] > t[3] && t[3] > t[4] && t[4] > t[6] &&
          t[6] > t[7])
        p++;
      else if (t[0] == t[1] && t[1] == t[3] && t[3] == t[4] && t[4] == t[6] &&
               t[6] == t[7])
        ta++;
      else
        g++;
    }
    v.push_back(s);
    pizza.push_back(p);
    taxi.push_back(ta);
    girls.push_back(g);
  }
  int maxi = -1;
  cout << "If you want to call a taxi, you should call: ";
  bool first = 1;
  for (int f = 0; f < v.size(); f++) {
    maxi = max(maxi, taxi[f]);
  }
  for (int f = 0; f < v.size(); f++) {
    if (taxi[f] == maxi) {
      if (first)
        cout << v[f];
      else
        cout << ", " << v[f];
      first = false;
    }
  }
  cout << "." << endl;
  maxi = -1;
  first = 1;
  cout << "If you want to order a pizza, you should call: ";
  for (int f = 0; f < v.size(); f++) {
    maxi = max(maxi, pizza[f]);
  }
  for (int f = 0; f < v.size(); f++) {
    if (pizza[f] == maxi) {
      if (first)
        cout << v[f];
      else
        cout << ", " << v[f];
      first = false;
    }
  }
  cout << "." << endl;
  maxi = -1;
  first = 1;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int f = 0; f < v.size(); f++) {
    maxi = max(maxi, girls[f]);
  }
  for (int f = 0; f < v.size(); f++) {
    if (girls[f] == maxi) {
      if (first)
        cout << v[f];
      else
        cout << ", " << v[f];
      first = false;
    }
  }
  cout << "." << endl;
}
