#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
struct key {
  string name;
  int t, p, g;
};
int main() {
  int n, s, mt = 0, mg = 0, mp = 0;
  string x;
  cin >> n;
  vector<key> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> s >> vec[i].name;
    vec[i].t = vec[i].p = vec[i].g = 0;
    for (int j = 0; j < s; j++) {
      cin >> x;
      if (x[0] == x[1] && x[1] == x[3] && x[3] == x[4] && x[4] == x[6] &&
          x[6] == x[7])
        vec[i].t++;
      else if (x[1] < x[0] && x[3] < x[1] && x[4] < x[3] && x[6] < x[4] &&
               x[7] < x[6])
        vec[i].p++;
      else
        vec[i].g++;
    }
    mt = max(mt, vec[i].t);
    mg = max(mg, vec[i].g);
    mp = max(mp, vec[i].p);
  }
  int f = 0;
  cout << "If you want to call a taxi, you should call:";
  for (int i = 0; i < n; i++)
    if (vec[i].t == mt) {
      if (f) cout << ',';
      cout << " " << vec[i].name;
      f = 1;
    }
  f = 0;
  cout << '.' << endl << "If you want to order a pizza, you should call:";
  for (int i = 0; i < n; i++)
    if (vec[i].p == mp) {
      if (f) cout << ',';
      cout << " " << vec[i].name;
      f = 1;
    }
  f = 0;
  cout << '.' << endl
       << "If you want to go to a cafe with a wonderful girl, you should call:";
  for (int i = 0; i < n; i++)
    if (vec[i].g == mg) {
      if (f) cout << ',';
      cout << " " << vec[i].name;
      f = 1;
    }
  cout << '.';
}
