#include <bits/stdc++.h>
using namespace std;
struct zbs {
  string name;
  int pizza, girl, taxi;
};
int main() {
  zbs a[111];
  string s, q;
  int maxT = 0, maxP = 0, maxG = 0, k, n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> k >> q;
    a[i].name = q;
    a[i].girl = a[i].pizza = a[i].taxi = 0;
    while (k--) {
      cin >> s;
      if (s[0] == s[1] && s[1] == s[3] && s[3] == s[4] && s[4] == s[6] &&
          s[6] == s[7]) {
        ++a[i].taxi;
        maxT = max(maxT, a[i].taxi);
      } else if (s[0] > s[1] && s[1] > s[3] && s[3] > s[4] && s[4] > s[6] &&
                 s[6] > s[7]) {
        ++a[i].pizza;
        maxP = max(maxP, a[i].pizza);
      } else {
        ++a[i].girl;
        maxG = max(maxG, a[i].girl);
      }
    }
  }
  bool G = 0, P = 0, T = 0;
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < n; ++i)
    if (a[i].taxi == maxT) {
      if (T) cout << ", ";
      cout << a[i].name;
      T = 1;
    }
  cout << ".\nIf you want to order a pizza, you should call: ";
  for (int i = 0; i < n; ++i)
    if (a[i].pizza == maxP) {
      if (P) cout << ", ";
      cout << a[i].name;
      P = 1;
    }
  cout << ".\nIf you want to go to a cafe with a wonderful girl, you should "
          "call: ";
  for (int i = 0; i < n; ++i)
    if (a[i].girl == maxG) {
      if (G) cout << ", ";
      cout << a[i].name;
      G = 1;
    }
  cout << '.';
}
