#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 10;
string name[N];
vector<int> ans1, ans2, ans3;
vector<int> n1, n2, n3;
vector<string> p1, p2, p3;
void ch(string s, int ind) {
  vector<int> a;
  bool ch0, ch1, ch2;
  ch0 = ch1 = ch2 = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '-') {
      if (s[0] != s[i]) ch0 = 0;
    }
  }
  if (ch0) {
    ans1[ind]++;
    n1[ind]++;
    return;
  }
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] != '-') {
      if (i + 2 < s.size() && s[i + 1] == '-') {
        if (s[i + 2] >= s[i]) ch1 = 0;
      } else if (s[i + 1] >= s[i])
        ch1 = 0;
    }
  }
  if (ch1) {
    ans2[ind]++;
    n2[ind]++;
    return;
  }
  ans3[ind]++;
  n3[ind]++;
  return;
}
int main() {
  int n;
  string s;
  cin >> n;
  ans1.resize(n);
  ans2.resize(n);
  ans3.resize(n);
  n1.resize(n);
  n2.resize(n);
  n3.resize(n);
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t >> name[i];
    for (int j = 0; j < t; j++) cin >> s, ch(s, i);
  }
  sort(ans1.begin(), ans1.end(), greater<int>());
  sort(ans2.begin(), ans2.end(), greater<int>());
  sort(ans3.begin(), ans3.end(), greater<int>());
  for (int i = 0; i < n; i++) {
    if (n1[i] == ans1[0]) p1.push_back(name[i]);
    if (n2[i] == ans2[0]) p2.push_back(name[i]);
    if (n3[i] == ans3[0]) p3.push_back(name[i]);
  }
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < p1.size(); i++) {
    cout << p1[i];
    if (i < p1.size() - 1) cout << ", ";
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < p2.size(); i++) {
    cout << p2[i];
    if (i < p2.size() - 1) cout << ", ";
  }
  cout << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < p3.size(); i++) {
    cout << p3[i];
    if (i < p3.size() - 1) cout << ", ";
  }
  cout << "." << endl;
}
