#include <bits/stdc++.h>
using namespace std;
int n, m;
string name[105];
int taxi[105];
int girl[105];
int pizza[105];
int main() {
  cin >> n;
  string s;
  for (int i = 1; i <= n; i++) {
    cin >> m >> name[i];
    for (int j = 1; j <= m; j++) {
      cin >> s;
      if (s[0] == s[1] && s[3] == s[4] && s[6] == s[7] && s[0] == s[3] &&
          s[0] == s[6]) {
        taxi[i]++;
        continue;
      }
      if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
          s[6] > s[7]) {
        pizza[i]++;
        continue;
      }
      girl[i]++;
    }
  }
  int maxpizza = 0;
  int maxgirl = 0;
  int maxtaxi = 0;
  for (int i = 1; i <= n; i++) {
    maxpizza = max(maxpizza, pizza[i]);
    maxgirl = max(maxgirl, girl[i]);
    maxtaxi = max(maxtaxi, taxi[i]);
  }
  vector<string> girls;
  vector<string> pizzas;
  vector<string> taxis;
  for (int i = 1; i <= n; i++) {
    if (taxi[i] == maxtaxi) taxis.push_back(name[i]);
    if (girl[i] == maxgirl) girls.push_back(name[i]);
    if (pizza[i] == maxpizza) pizzas.push_back(name[i]);
  }
  printf("If you want to call a taxi, you should call: ");
  for (int i = 0; i < taxis.size(); i++) {
    if (i != taxis.size() - 1)
      cout << taxis[i] << ", ";
    else
      cout << taxis[i] << "." << endl;
  }
  printf("If you want to order a pizza, you should call: ");
  for (int i = 0; i < pizzas.size(); i++) {
    if (i != pizzas.size() - 1)
      cout << pizzas[i] << ", ";
    else
      cout << pizzas[i] << "." << endl;
  }
  printf(
      "If you want to go to a cafe with a wonderful girl, you should call: ");
  for (int i = 0; i < girls.size(); i++) {
    if (i != girls.size() - 1)
      cout << girls[i] << ", ";
    else
      cout << girls[i] << "." << endl;
  }
}
