#include <bits/stdc++.h>
using namespace std;
struct person {
  int phones, taxi, pizza, girl;
  string name;
  void set(int it, string st) {
    phones = it;
    name = st;
    taxi = 0;
    pizza = 0;
    girl = 0;
  }
  person() {
    phones = 0;
    name = "";
    taxi = 0;
    pizza = 0;
    girl = 0;
  }
};
int main() {
  int n, i, i2, i3, maxp = 0, maxt = 0, maxg = 0;
  string st;
  cin >> n;
  person *p = new person[n];
  for (i = 0; i < n; i++) {
    cin >> i2 >> st;
    p[i].set(i2, st);
    for (i3 = 0; i3 < i2; i3++) {
      cin >> st;
      if (st[0] == st[1] && st[1] == st[3] && st[3] == st[4] &&
          st[4] == st[6] && st[6] == st[7]) {
        p[i].taxi++;
      } else {
        if (st[0] > st[1] && st[1] > st[3] && st[3] > st[4] && st[4] > st[6] &&
            st[6] > st[7]) {
          p[i].pizza++;
        } else
          p[i].girl++;
      }
    }
    if (p[i].taxi > maxt) maxt = p[i].taxi;
    if (p[i].pizza > maxp) maxp = p[i].pizza;
    if (p[i].girl > maxg) maxg = p[i].girl;
  }
  cout << "If you want to call a taxi, you should call: ";
  bool prev = false;
  for (i = 0; i < n; i++) {
    if (p[i].taxi == maxt) {
      if (prev == true) cout << ", ";
      prev = true;
      cout << p[i].name;
    }
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  prev = false;
  for (i = 0; i < n; i++) {
    if (p[i].pizza == maxp) {
      if (prev == true) cout << ", ";
      prev = true;
      cout << p[i].name;
    }
  }
  cout << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  prev = false;
  for (i = 0; i < n; i++) {
    if (p[i].girl == maxg) {
      if (prev == true) cout << ", ";
      prev = true;
      cout << p[i].name;
    }
  }
  cout << ".";
  delete[] p;
  return 0;
}
