#include <bits/stdc++.h>
using namespace std;
struct friends {
  char name[21];
  int taxi, baby, pizza;
};
int main() {
  int s, n;
  string str;
  cin >> n;
  friends *nm = new friends[n];
  friends ans;
  ans.taxi = -1;
  ans.baby = -1;
  ans.pizza = -1;
  for (int i = 0; i < n; i++) {
    cin >> s;
    cin >> nm[i].name;
    nm[i].taxi = 0;
    nm[i].baby = 0;
    nm[i].pizza = 0;
    for (int j = 0; j < s; j++) {
      cin >> str;
      if ((int)str[0] > (int)str[1] && (int)str[1] > (int)str[3] &&
          (int)str[3] > (int)str[4] && (int)str[4] > (int)str[6] &&
          (int)str[6] > (int)str[7])
        nm[i].pizza++;
      else if (((int)str[0] == (int)str[1]) && ((int)str[0] == (int)str[3]) &&
               ((int)str[0] == (int)str[4]) && ((int)str[0] == (int)str[6]) &&
               ((int)str[0] == (int)str[7]))
        nm[i].taxi++;
      else
        nm[i].baby++;
    }
    if (nm[i].taxi > ans.taxi) ans.taxi = nm[i].taxi;
    if (nm[i].pizza > ans.pizza) ans.pizza = nm[i].pizza;
    if (nm[i].baby > ans.baby) ans.baby = nm[i].baby;
  }
  int p = 0;
  cout << "If you want to call a taxi, you should call: ";
  bool t = false;
  for (int i = 0; i < n; i++) {
    if (nm[i].taxi == ans.taxi) {
      if (p)
        cout << ", " << nm[i].name;
      else
        cout << nm[i].name;
      p++;
      t = true;
    }
  }
  if (t) cout << '.';
  cout << endl;
  cout << "If you want to order a pizza, you should call: ";
  p = 0;
  t = false;
  for (int i = 0; i < n; i++) {
    if (nm[i].pizza == ans.pizza) {
      if (p)
        cout << ", " << nm[i].name;
      else
        cout << nm[i].name;
      p++;
      t = true;
    }
  }
  if (t) cout << '.';
  cout << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  p = 0;
  t = false;
  for (int i = 0; i < n; i++) {
    if (nm[i].baby == ans.baby) {
      if (p)
        cout << ", " << nm[i].name;
      else
        cout << nm[i].name;
      t = true;
      p++;
    }
  }
  if (t) cout << '.';
  return 0;
}
