#include <bits/stdc++.h>
using namespace std;
bool isTaxi(string s) {
  return (s[0] == s[1]) && (s[0] == s[3]) && (s[0] == s[4]) && (s[0] == s[6]) &&
         (s[0] == s[7]);
}
bool isPizza(string s) {
  return (s[0] > s[1]) && (s[1] > s[3]) && (s[3] > s[4]) && (s[4] > s[6]) &&
         (s[6] > s[7]);
}
int F[105][3];
string N[105];
int main() {
  int n;
  cin >> n;
  int nTaxi = 0, nPizza = 0, nGirl = 0;
  for (int i = 1; i <= n; i++) {
    int m;
    cin >> m >> N[i];
    string s;
    for (int j = 1; j <= m; j++) {
      cin >> s;
      if (isTaxi(s)) {
        F[i][0]++;
        nTaxi = max(nTaxi, F[i][0]);
      } else if (isPizza(s)) {
        F[i][1]++;
        nPizza = max(nPizza, F[i][1]);
      } else {
        F[i][2]++;
        nGirl = max(nGirl, F[i][2]);
      }
    }
  }
  bool b = 0;
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 1; i <= n; i++) {
    if (F[i][0] == nTaxi) {
      if (b) cout << ", ";
      cout << N[i];
      b = 1;
    }
  }
  cout << "." << endl;
  b = 0;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 1; i <= n; i++) {
    if (F[i][1] == nPizza) {
      if (b) cout << ", ";
      cout << N[i];
      b = 1;
    }
  }
  cout << "." << endl;
  b = 0;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 1; i <= n; i++) {
    if (F[i][2] == nGirl) {
      if (b) cout << ", ";
      cout << N[i];
      b = 1;
    }
  }
  cout << "." << endl;
}
