#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1000000007;
using namespace std;
struct phoneBook {
  int taxis, pizzas, girls;
};
phoneBook findNum(string arr[], int n) {
  int t = 0, p = 0, g = 0;
  for (long long int i = 0; i < n; i++) {
    string s = arr[i];
    bool isT = true, isP = true;
    for (int j = 1; j < s.size(); j++) {
      if (s[j] != s[j - 1]) {
        isT = false;
      }
      if (s[j] >= s[j - 1]) {
        isP = false;
      }
    }
    if (isT) {
      t++;
    } else if (isP) {
      p++;
    } else {
      g++;
    }
  }
  return {t, p, g};
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int maxT = 0, maxP = 0, maxG = 0;
  vector<string> maxTF, maxPF, maxGF;
  int n;
  cin >> n;
  while (n--) {
    int si;
    cin >> si;
    string s;
    cin >> s;
    string num[si];
    for (long long int i = 0; i < si; i++) {
      cin >> num[i];
      num[i].erase(remove(num[i].begin(), num[i].end(), '-'), num[i].end());
    }
    phoneBook p = findNum(num, si);
    if (p.taxis > maxT) {
      maxT = p.taxis;
      maxTF.clear();
      maxTF.push_back(s);
    } else if (p.taxis == maxT) {
      maxTF.push_back(s);
    }
    if (p.pizzas > maxP) {
      maxP = p.pizzas;
      maxPF.clear();
      maxPF.push_back(s);
    } else if (p.pizzas == maxP) {
      maxPF.push_back(s);
    }
    if (p.girls > maxG) {
      maxG = p.girls;
      maxGF.clear();
      maxGF.push_back(s);
    } else if (p.girls == maxG) {
      maxGF.push_back(s);
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (long long int i = 0; i < maxTF.size() - 1; i++) {
    cout << maxTF[i] << ", ";
  }
  cout << maxTF[maxTF.size() - 1] << ".\n";
  cout << "If you want to order a pizza, you should call: ";
  for (long long int i = 0; i < maxPF.size() - 1; i++) {
    cout << maxPF[i] << ", ";
  }
  cout << maxPF[maxPF.size() - 1] << ".\n";
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (long long int i = 0; i < maxGF.size() - 1; i++) {
    cout << maxGF[i] << ", ";
  }
  cout << maxGF[maxGF.size() - 1] << ".\n";
  return 0;
}
