#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  vector<string> names(n);
  vector<int> Taxi(n);
  vector<int> Pizza(n);
  vector<int> Girl(n);
  int maxTaxi = 0, maxPizza = 0, maxGirl = 0;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    cin >> names[i];
    for (int j = 0; j < k; j++) {
      cin >> s;
      if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
          s[6] == s[7]) {
        Taxi[i]++;
        if (Taxi[i] > maxTaxi) {
          maxTaxi = Taxi[i];
        }
      } else if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
                 s[6] > s[7]) {
        Pizza[i]++;
        if (Pizza[i] > maxPizza) {
          maxPizza = Pizza[i];
        }
      } else
        Girl[i]++;
      if (Girl[i] > maxGirl) {
        maxGirl = Girl[i];
      }
    }
  }
  int index = 0;
  cout << "If you want to call a taxi, you should call:";
  for (int i = 0; i < n; i++) {
    if (Taxi[i] == maxTaxi) {
      if (index != 0) {
        cout << ",";
      }
      cout << " " << names[i];
      index = 1;
    }
  }
  index = 0;
  cout << "." << endl << "If you want to order a pizza, you should call:";
  for (int i = 0; i < n; i++) {
    if (Pizza[i] == maxPizza) {
      if (index != 0) cout << ",";
      cout << " " << names[i];
      index = 1;
    }
  }
  index = 0;
  cout << "." << endl
       << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (int i = 0; i < n; i++) {
    if (Girl[i] == maxGirl) {
      if (index != 0) cout << ",";
      cout << " " << names[i];
      index = 1;
    }
  }
  cout << "." << endl;
}
