#include <bits/stdc++.h>
using namespace std;
int n, s, taxi[111], girl[111], pizza[111], maxt, maxg, maxp, lt, lg, lp;
string name[111], c;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s >> name[i];
    for (int j = 0; j < s; j++) {
      cin >> c;
      char a = c[0];
      if (c[1] == a && c[3] == a && c[4] == a && c[6] == a && c[7] == a)
        taxi[i]++;
      else if (c[1] < a && c[3] < c[1] && c[4] < c[3] && c[6] < c[4] &&
               c[7] < c[6]) {
        bool ok = 0;
        sort(c.begin(), c.end());
        for (int k = 1; k < 8; k++)
          if (c[k] == c[k - 1] && c[k] != '-') ok = 1;
        if (!ok)
          pizza[i]++;
        else
          girl[i]++;
      } else
        girl[i]++;
    }
    maxt = max(maxt, taxi[i]);
    maxp = max(maxp, pizza[i]);
    maxg = max(maxg, girl[i]);
    if (maxt == taxi[i]) lt = i;
    if (maxp == pizza[i]) lp = i;
    if (maxg == girl[i]) lg = i;
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < n; i++)
    if (taxi[i] == maxt) {
      cout << name[i];
      if (i == lt)
        cout << ".\n";
      else
        cout << ", ";
    }
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < n; i++)
    if (pizza[i] == maxp) {
      cout << name[i];
      if (i == lp)
        cout << ".\n";
      else
        cout << ", ";
    }
  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] == maxg) {
      cout << name[i];
      if (i == lg)
        cout << ".";
      else
        cout << ", ";
    }
  return 0;
}
