#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, taxi = 0, pizza = 0, girl = 0;
  vector<int> taxi_id, pizza_id, girl_id;
  string s[101];
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int k, ltaxi = 0, lpizza = 0, lgirl = 0;
    cin >> k >> s[i];
    for (int j = 0; j < k; j++) {
      string t;
      int temp, p = 0, l = 0;
      cin >> t;
      temp = t[0];
      for (int q = 1; q < 8; ++q)
        if (t[q] != '-') {
          if (t[q] == temp) ++p;
          if (t[q] < temp) {
            ++l;
            temp = t[q];
          }
        }
      if (p == 5)
        ltaxi++;
      else if (l == 5)
        lpizza++;
      else
        lgirl++;
    }
    if (ltaxi >= taxi) {
      if (ltaxi == taxi)
        taxi_id.push_back(i);
      else {
        taxi_id.clear();
        taxi_id.push_back(i);
      }
      taxi = ltaxi;
    }
    if (lpizza >= pizza) {
      if (lpizza == pizza)
        pizza_id.push_back(i);
      else {
        pizza_id.clear();
        pizza_id.push_back(i);
      }
      pizza = lpizza;
    }
    if (lgirl >= girl) {
      if (lgirl == girl)
        girl_id.push_back(i);
      else {
        girl_id.clear();
        girl_id.push_back(i);
      }
      girl = lgirl;
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < taxi_id.size() - 1; ++i) cout << s[taxi_id[i]] << ", ";
  cout << s[taxi_id[taxi_id.size() - 1]] << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < pizza_id.size() - 1; ++i) cout << s[pizza_id[i]] << ", ";
  cout << s[pizza_id[pizza_id.size() - 1]] << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < girl_id.size() - 1; ++i) cout << s[girl_id[i]] << ", ";
  cout << s[girl_id[girl_id.size() - 1]] << "." << endl;
  return 0;
}
