#include <bits/stdc++.h>
using namespace std;
vector<string> taxi;
vector<string> pizza;
vector<string> girls;
map<string, int[3]> m;
map<string, int[3]>::iterator it;
void check(string name, string num) {
  while (num.find('-') != string::npos) {
    int pos = num.find('-');
    num.erase(pos, 1);
  }
  set<char> se;
  for (int i = 1; i < num.size(); i++) {
    se.insert(num[i]);
  }
  if (se.size() == 1) {
    m[name][0]++;
    return;
  }
  se.clear();
  for (int i = 1; i < num.size(); i++) {
    if (num[i - 1] <= num[i]) {
      m[name][1]++;
      return;
    }
  }
  m[name][2]++;
}
int main() {
  int n, n2, maxtaxi = INT_MIN, maxpizza = INT_MIN, maxg = INT_MIN;
  cin >> n;
  string name[n + 1], num;
  for (int i = 0; i < n; i++) {
    cin >> n2 >> name[i];
    for (int j = 0; j < n2; j++) {
      cin >> num;
      check(name[i], num);
    }
  }
  for (int i = 0; i < n; i++) {
    maxtaxi = max(maxtaxi, m[name[i]][0]);
    maxg = max(maxg, m[name[i]][1]);
    maxpizza = max(maxpizza, m[name[i]][2]);
  }
  for (int i = 0; i < n; i++) {
    if (m[name[i]][0] == maxtaxi) {
      taxi.push_back(name[i]);
    }
    if (m[name[i]][1] == maxg) {
      girls.push_back(name[i]);
    }
    if (m[name[i]][2] == maxpizza) {
      pizza.push_back(name[i]);
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < taxi.size(); i++) {
    cout << taxi[i];
    if (i == taxi.size() - 1) {
      cout << ".";
    } else
      cout << ", ";
  }
  cout << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < pizza.size(); i++) {
    cout << pizza[i];
    if (i == pizza.size() - 1) {
      cout << ".";
    } else
      cout << ", ";
  }
  cout << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < girls.size(); i++) {
    cout << girls[i];
    if (i == girls.size() - 1) {
      cout << ".";
    } else
      cout << ", ";
  }
  return 0;
}
