#include <bits/stdc++.h>
using namespace std;
vector<string> v1, v2, v3;
struct phonebook {
  string name;
  int index, cnt1 = 0, cnt2 = 0, cnt3 = 0;
} pb[102];
bool cmp1(phonebook a, phonebook b) {
  return a.cnt1 > b.cnt1 || (a.cnt1 == b.cnt1 && a.index < b.index);
}
bool cmp2(phonebook a, phonebook b) {
  return a.cnt2 > b.cnt2 || (a.cnt2 == b.cnt2 && a.index < b.index);
}
bool cmp3(phonebook a, phonebook b) {
  return a.cnt3 > b.cnt3 || (a.cnt3 == b.cnt3 && a.index < b.index);
}
int main() {
  int n, t, i, j;
  cin >> n;
  string s;
  for (i = 0; i < n; ++i) {
    cin >> t >> pb[i].name;
    pb[i].index = i;
    for (j = 0; j < t; ++j) {
      cin >> s;
      if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
          s[6] == s[7])
        pb[i].cnt1++;
      else if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
               s[6] > s[7])
        pb[i].cnt2++;
      else
        pb[i].cnt3++;
    }
  }
  sort(pb, pb + n, cmp1);
  int t1 = pb[0].cnt1;
  for (i = 0; i < n; ++i) {
    if (pb[i].cnt1 == t1) v1.push_back(pb[i].name);
  }
  sort(pb, pb + n, cmp2);
  int t2 = pb[0].cnt2;
  for (i = 0; i < n; ++i) {
    if (pb[i].cnt2 == t2) v2.push_back(pb[i].name);
  }
  sort(pb, pb + n, cmp3);
  int t3 = pb[0].cnt3;
  for (i = 0; i < n; ++i) {
    if (pb[i].cnt3 == t3) v3.push_back(pb[i].name);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (i = 0; i < v1.size(); ++i) {
    cout << v1[i];
    if (i != v1.size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (i = 0; i < v2.size(); ++i) {
    cout << v2[i];
    if (i != v2.size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (i = 0; i < v3.size(); ++i) {
    cout << v3[i];
    if (i != v3.size() - 1)
      cout << ", ";
    else
      cout << ".";
  }
  cout << endl;
  return 0;
}
