#include <bits/stdc++.h>
using namespace std;
string name[102];
bool istaxi(string s) {
  s.erase(5, 1);
  s.erase(2, 1);
  for (int i = 1; i < 6; i++) {
    if (s[i] != s[i - 1]) {
      return 0;
    }
  }
  return 1;
}
bool ispizza(string s) {
  s.erase(5, 1);
  s.erase(2, 1);
  for (int i = 1; i < 6; i++) {
    if (s[i] >= s[i - 1]) {
      return 0;
    }
  }
  return 1;
}
int pizza[102], taxi[102], girl[102];
int maxT, maxG, maxP;
int main() {
  int n, t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n >> name[i];
    for (int j = 0; j < n; j++) {
      string phone;
      cin >> phone;
      if (istaxi(phone)) {
        taxi[i]++;
        maxT = max(maxT, taxi[i]);
      } else if (ispizza(phone)) {
        pizza[i]++;
        maxP = max(maxP, pizza[i]);
      } else {
        girl[i]++;
        maxG = max(maxG, girl[i]);
      }
    }
  }
  string tt, gg, pp;
  for (int i = 0; i < t; i++) {
    if (maxT == taxi[i]) tt += " " + name[i] + ",";
  }
  tt[tt.length() - 1] = '.';
  cout << "If you want to call a taxi, you should call:" << tt << endl;
  for (int i = 0; i < t; i++) {
    if (maxP == pizza[i]) pp += " " + name[i] + ",";
  }
  pp[pp.length() - 1] = '.';
  cout << "If you want to order a pizza, you should call:" << pp << endl;
  for (int i = 0; i < t; i++) {
    if (maxG == girl[i]) gg += " " + name[i] + ",";
  }
  gg[gg.length() - 1] = '.';
  cout << "If you want to go to a cafe with a wonderful girl, you should call:"
       << gg << endl;
}
