#include <bits/stdc++.h>
using namespace std;
int a, b, maxp = 0, maxt = 0, maxg = 0;
string c[301], d, e;
int f[301][3];
bool g;
bool taxi(string x) {
  if (x[0] == x[1] && x[1] == x[3] && x[3] == x[4] && x[4] == x[6] &&
      x[6] == x[7])
    return true;
  else
    return false;
}
bool pizza(string y) {
  if (y[0] > y[1] && y[1] > y[3] && y[3] > y[4] && y[4] > y[6] && y[6] > y[7])
    return true;
  else
    return false;
}
int main() {
  cin >> a;
  int q = a;
  memset(f, 0, sizeof(f));
  for (int i = 0; i < a; i++) {
    cin >> b >> c[i];
    while (b--) {
      cin >> d;
      if (taxi(d)) {
        f[i][0]++;
      } else if (pizza(d)) {
        f[i][1]++;
      } else
        f[i][2]++;
    }
    if (f[i][0] > maxt) maxt = f[i][0];
    if (f[i][1] > maxp) maxp = f[i][1];
    if (f[i][2] > maxg) maxg = f[i][2];
  }
  g = false;
  cout << "If you want to call a taxi, you should call: ";
  for (int i = 0; i < a; i++) {
    if (f[i][0] == maxt) {
      if (g) {
        cout << ", ";
      }
      g = true;
      cout << c[i];
    }
  }
  g = false;
  cout << '.' << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i < a; i++) {
    if (f[i][1] == maxp) {
      if (g) {
        cout << ", ";
      }
      g = true;
      cout << c[i];
    }
  }
  g = false;
  cout << '.' << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i < a; i++) {
    if (f[i][2] == maxg) {
      if (g) {
        cout << ", ";
      }
      g = true;
      cout << c[i];
    }
  }
  cout << '.' << endl;
}
