#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  string s, number;
  cin >> n;
  string name[n];
  int taxi[n], pizza[n], cg[n], tax, pizz, cgc, taxmax = -1, pizzmax = -1,
                                                cgcmax = -1;
  int taxifinal[n], pizzafinal[n], cgcfinal[n], ct = 0, cp = 0, cc = 0;
  for (int i = 0; i < n; i++) {
    cin >> p >> name[i];
    tax = 0;
    pizz = 0;
    cgc = 0;
    for (int j = 0; j < p; j++) {
      cin >> number;
      if (((number[0] == number[3]) && (number[3] == number[6])) &&
          ((number[0] == number[1]) && (number[3] == number[4]) &&
           (number[6] == number[7]))) {
        tax++;
      } else if ((int(number[0]) > int(number[1])) &&
                 (int(number[1]) > int(number[3])) &&
                 (int(number[3]) > int(number[4])) &&
                 (int(number[4]) > int(number[6])) &&
                 (int(number[6]) > int(number[7]))) {
        pizz++;
      } else {
        cgc++;
      }
    }
    taxi[i] = tax;
    pizza[i] = pizz;
    cg[i] = cgc;
  }
  for (int i = 0; i < n; i++) {
    taxmax = max(taxmax, taxi[i]);
    pizzmax = max(pizzmax, pizza[i]);
    cgcmax = max(cgcmax, cg[i]);
  }
  for (int i = 0; i < n; i++) {
    if (taxmax == taxi[i]) {
      taxifinal[ct] = i;
      ct++;
    }
    if (pizzmax == pizza[i]) {
      pizzafinal[cp] = i;
      cp++;
    }
    if (cgcmax == cg[i]) {
      cgcfinal[cc] = i;
      cc++;
    }
  }
  cout << "If you want to call a taxi, you should call:";
  if (ct > 1) {
    for (int j = 0; j < ct - 1; j++) {
      cout << " " << name[taxifinal[j]] << ",";
    }
    cout << " " << name[taxifinal[ct - 1]] << "." << endl;
  } else {
    cout << " " << name[taxifinal[ct - 1]] << "." << endl;
  }
  cout << "If you want to order a pizza, you should call:";
  if (cp > 1) {
    for (int j = 0; j < cp - 1; j++) {
      cout << " " << name[pizzafinal[j]] << ",";
    }
    cout << " " << name[pizzafinal[cp - 1]] << "." << endl;
  } else {
    cout << " " << name[pizzafinal[cp - 1]] << "." << endl;
  }
  cout << "If you want to go to a cafe with a wonderful girl, you should call:";
  if (cc > 1) {
    for (int j = 0; j < cc - 1; j++) {
      cout << " " << name[cgcfinal[j]] << ",";
    }
    cout << " " << name[cgcfinal[cc - 1]] << "." << endl;
  } else {
    cout << " " << name[cgcfinal[cc - 1]] << "." << endl;
  }
  return 0;
}
