#include <bits/stdc++.h>
using namespace std;
int main() {
  string name[1000];
  int pizza[1000] = {0};
  int girl[1000] = {0};
  int taxi[1000] = {0};
  int n;
  cin >> n;
  int mx_t = -1;
  int mx_p = -1;
  int mx_g = -1;
  int last_t;
  int last_p;
  int last_g;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    cin >> name[i];
    for (int j = 0; j < k; j++) {
      string temp;
      cin >> temp;
      if (temp[0] == temp[1] && temp[1] == temp[3] && temp[3] == temp[4] &&
          temp[4] == temp[6] && temp[6] == temp[7]) {
        taxi[i]++;
        last_t = i;
      } else if (temp[0] > temp[1] && temp[1] > temp[3] && temp[3] > temp[4] &&
                 temp[4] > temp[6] && temp[6] > temp[7]) {
        pizza[i]++;
        last_p = i;
      } else {
        girl[i]++;
        last_g = i;
      }
    }
    mx_t = max(mx_t, taxi[i]);
    mx_g = max(mx_g, girl[i]);
    mx_p = max(mx_p, pizza[i]);
  }
  for (int i = 0; i < n; i++) {
    if (taxi[i] == mx_t) last_t = i;
  }
  for (int i = 0; i < n; i++) {
    if (pizza[i] == mx_p) last_p = i;
  }
  for (int i = 0; i < n; i++) {
    if (girl[i] == mx_g) last_g = i;
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < n; i++) {
    if (taxi[i] == mx_t) {
      cout << name[i];
      if (i < last_t) cout << ", ";
    }
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < n; i++) {
    if (pizza[i] == mx_p) {
      cout << name[i];
      if (i < last_p) cout << ", ";
    }
  }
  cout << "." << endl;
  cout
      << "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] == mx_g) {
      cout << name[i];
      if (i < last_g) cout << ", ";
    }
  }
  cout << "." << endl;
}
