#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double EPS = 1e-9;
const int BIG_PRIME7 = 1000000007;
const int BIG_PRIME9 = 1000000009;
char ch;
long long i, j, n, m, k, l, c, p, nl, np, d;
long long N, C;
int f[3][10010];
string names[10010];
bool isTaxi(string x) {
  bool ind = true;
  if (x[0] == x[1] && x[1] == x[3] && x[1] == x[4] && x[1] == x[6] &&
      x[1] == x[7])
    ind = true;
  else
    ind = false;
  return ind;
}
bool isPizza(string x) {
  bool ind = true;
  int f = 0;
  if (x[0] > x[1] && x[1] > x[3] && x[3] > x[4] && x[4] > x[6] && x[6] > x[7])
    ind = true;
  else
    ind = false;
  return ind;
}
vector<string> findMax(int index) {
  vector<string> ans;
  int i, maxi = 0;
  for (i = 0; i < n; i++) {
    maxi = max(f[index][i], maxi);
  }
  for (i = 0; i < n; i++) {
    if (f[index][i] == maxi) ans.push_back(names[i]);
  }
  return ans;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int m = 0;
    cin >> m >> names[i];
    for (int j = 0; j < m; j++) {
      string s;
      cin >> s;
      if (isPizza(s)) {
        f[1][i]++;
      } else if (isTaxi(s)) {
        f[0][i]++;
      } else {
        f[2][i]++;
      }
    }
  }
  vector<string> taxi = findMax(0);
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < taxi.size(); i++) {
    cout << taxi[i];
    if (i != taxi.size() - 1)
      cout << ", ";
    else
      cout << "." << endl;
  }
  vector<string> Pizza = findMax(1);
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < Pizza.size(); i++) {
    cout << Pizza[i];
    if (i != Pizza.size() - 1)
      cout << ", ";
    else
      cout << "." << endl;
  }
  vector<string> Girls = findMax(2);
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < Girls.size(); i++) {
    cout << Girls[i];
    if (i != Girls.size() - 1)
      cout << ", ";
    else
      cout << "." << endl;
  }
  return 0;
}
