#include <bits/stdc++.h>
using namespace std;
struct Person {
  string name;
  int pizza, taxi, another;
};
bool isPizza(string num) {
  char ch = num[0];
  for (int i = 1; i < num.size(); i++) {
    if (num[i] == '-')
      continue;
    else if (ch - num[i] <= 0)
      return false;
    else
      ch = num[i];
  }
  return true;
}
bool isTaxi(string num) {
  char ch = num[0];
  for (int i = 1; i < num.size(); i++) {
    if (num[i] == '-')
      continue;
    else if (num[i] != ch)
      return false;
  }
  return true;
}
void output(string ss, vector<string> v) {
  cout << ss;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i];
    if (i + 1 == v.size())
      cout << ".\n";
    else
      cout << ", ";
  }
}
int main(void) {
  vector<Person> v;
  int n, m, maxp, maxt, maxa;
  cin >> n;
  maxp = maxt = maxa = -1;
  for (int i = 0; i < n; i++) {
    Person p;
    cin >> m >> p.name;
    p.pizza = p.taxi = p.another = 0;
    string num;
    for (int j = 0; j < m; j++) {
      cin >> num;
      if (isPizza(num))
        p.pizza++;
      else if (isTaxi(num))
        p.taxi++;
      else
        p.another++;
    }
    maxp = max(p.pizza, maxp);
    maxt = max(p.taxi, maxt);
    maxa = max(p.another, maxa);
    v.push_back(p);
  }
  vector<string> outP, outT, outA;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].pizza == maxp) outP.push_back(v[i].name);
    if (v[i].taxi == maxt) outT.push_back(v[i].name);
    if (v[i].another == maxa) outA.push_back(v[i].name);
  }
  output("If you want to call a taxi, you should call: ", outT);
  output("If you want to order a pizza, you should call: ", outP);
  output("If you want to go to a cafe with a wonderful girl, you should call: ",
         outA);
}
