#include <bits/stdc++.h>
using namespace std;
int check(string s) {
  if (s[0] == s[1] && s[0] == s[3] && s[0] == s[4] && s[0] == s[6] &&
      s[0] == s[7])
    return 0;
  if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] && s[6] > s[7])
    return 1;
  return 2;
}
struct data {
  int t;
  int p;
  int g;
  string name;
} node[101];
int ans[101][4];
int taxi = -1, pizza = -1, girl = -1;
int main() {
  int n, p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p >> node[i].name;
    for (int j = 0; j < p; j++) {
      string num;
      cin >> num;
      switch (check(num)) {
        case 0:
          node[i].t++;
          break;
        case 1:
          node[i].p++;
          break;
        case 2:
          node[i].g++;
          break;
      }
    }
    taxi = max(node[i].t, taxi);
    pizza = max(node[i].p, pizza);
    girl = max(node[i].g, girl);
  }
  cout << "If you want to call a taxi, you should call: ";
  int j = 0;
  for (int i = 0; i < n; i++) {
    if (taxi == node[i].t) {
      if (j)
        cout << ", " << node[i].name;
      else {
        cout << node[i].name;
        j = 1;
      }
    }
  }
  cout << "."
       << "\n";
  cout << "If you want to order a pizza, you should call: ";
  j = 0;
  for (int i = 0; i < n; i++) {
    if (pizza == node[i].p) {
      if (j)
        cout << ", " << node[i].name;
      else {
        cout << node[i].name;
        j = 1;
      }
    }
  }
  cout << "."
       << "\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  j = 0;
  for (int i = 0; i < n; i++) {
    if (girl == node[i].g) {
      if (j)
        cout << ", " << node[i].name;
      else {
        cout << node[i].name;
        j = 1;
      }
    }
  }
  cout << "."
       << "\n";
}
