#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> taxi(n), pizza(n), girls(n);
  vector<string> names;
  int x = 0;
  string t;
  char ch1, ch2;
  int a1, a2, a3;
  int d1, d2, d3;
  for (int i = 0; i < n; i++) {
    cin >> x;
    cin >> t;
    names.push_back(t);
    for (int j = 0; j < x; j++) {
      cin >> d1 >> ch1 >> d2 >> ch2 >> d3;
      a1 = d1 % 10;
      d1 = d1 / 10;
      a2 = d2 % 10;
      d2 = d2 / 10;
      a3 = d3 % 10;
      d3 = d3 / 10;
      set<int> s;
      s.insert(a1);
      s.insert(d1);
      s.insert(a2);
      s.insert(d2);
      s.insert(a3);
      s.insert(d3);
      if (s.size() == 1)
        taxi[i]++;
      else if (d1 > a1 && a1 > d2 && d2 > a2 && a2 > d3 && d3 > a3) {
        if (s.size() == 6) pizza[i]++;
      } else
        girls[i]++;
    }
  }
  vector<string> xn;
  int m = *max_element(taxi.begin(), taxi.end());
  for (int i = 0; i < n; i++) {
    if (taxi[i] == m) xn.push_back(names[i]);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < xn.size(); i++) {
    if (i == xn.size() - 1)
      cout << xn[i] << ".";
    else
      cout << xn[i] << ", ";
  }
  cout << endl;
  xn.clear();
  m = *max_element(pizza.begin(), pizza.end());
  for (int i = 0; i < n; i++) {
    if (pizza[i] == m) xn.push_back(names[i]);
  }
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < xn.size(); i++) {
    if (i == xn.size() - 1)
      cout << xn[i] << ".";
    else
      cout << xn[i] << ", ";
  }
  cout << endl;
  xn.clear();
  m = *max_element(girls.begin(), girls.end());
  for (int i = 0; i < n; i++) {
    if (girls[i] == m) xn.push_back(names[i]);
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < xn.size(); i++) {
    if (i == xn.size() - 1)
      cout << xn[i] << ".";
    else
      cout << xn[i] << ", ";
  }
  xn.clear();
  return 0;
}
