#include <bits/stdc++.h>
using namespace std;
struct P {
  string name;
  int tys[5];
} peo[109];
int n, si, phon[10];
int types(int s[], int nn) {
  int len = nn;
  bool flg = true;
  int i;
  for (i = 1; i < len; ++i) {
    if (s[i] != s[i - 1]) break;
  }
  if (i == len) {
    return 1;
  }
  for (i = 1; i < len; ++i) {
    if (s[i] >= s[i - 1]) break;
  }
  if (i == len) {
    return 2;
  }
  return 3;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    memset(peo[i].tys, 0, sizeof(peo[i].tys));
  }
  for (int ii = 0; ii < n; ++ii) {
    cin >> si >> peo[ii].name;
    char c1, c2;
    for (int i = 0; i < si; ++i) {
      cin >> phon[0] >> c1 >> phon[2] >> c2 >> phon[4];
      phon[1] = phon[0] % 10;
      phon[0] = phon[0] / 10;
      phon[3] = phon[2] % 10;
      phon[2] = phon[2] / 10;
      phon[5] = phon[4] % 10;
      phon[4] = phon[4] / 10;
      int ssss = types(phon, 6);
      peo[ii].tys[ssss]++;
    }
  }
  int n1, n2, n3, num1 = -1, num2 = -1, num3 = -1;
  for (int i = 0; i < n; ++i) {
    if (peo[i].tys[1] > num1) {
      num1 = peo[i].tys[1];
    }
    if (peo[i].tys[2] > num2) {
      num2 = peo[i].tys[2];
    }
    if (peo[i].tys[3] > num3) {
      num3 = peo[i].tys[3];
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  bool flg = false;
  for (int i = 0; i < n; i++) {
    if (peo[i].tys[1] == num1) {
      if (!flg)
        cout << peo[i].name, flg = true;
      else
        cout << ", " << peo[i].name;
    }
  }
  cout << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  flg = false;
  for (int i = 0; i < n; i++) {
    if (peo[i].tys[2] == num2) {
      if (!flg)
        cout << peo[i].name, flg = true;
      else
        cout << ", " << peo[i].name;
    }
  }
  cout << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  flg = false;
  for (int i = 0; i < n; i++) {
    if (peo[i].tys[3] == num3) {
      if (!flg)
        cout << peo[i].name, flg = true;
      else
        cout << ", " << peo[i].name;
    }
  }
  cout << "." << endl;
  return 0;
}
