#include <bits/stdc++.h>
using namespace std;
struct people {
  char name[1000];
  int taxi = 0;
  int pizza = 0;
  int girl = 0;
  int number;
} p[1000];
bool cmt(people a, people b) {
  if (a.taxi == b.taxi) {
    return a.number < b.number;
  }
  return a.taxi > b.taxi;
}
bool cmp(people a, people b) {
  if (a.pizza == b.pizza) {
    return a.number < b.number;
  }
  return a.pizza > b.pizza;
}
bool cmg(people a, people b) {
  if (a.girl == b.girl) {
    return a.number < b.number;
  }
  return a.girl > b.girl;
}
int main() {
  int m;
  cin >> m;
  for (int j = 0; j < m; j++) {
    int n;
    cin >> n;
    cin >> p[j].name;
    p[j].number = j;
    char b[10];
    for (int i = 0; i < n; i++) {
      char b[10];
      char x;
      cin >> b[1];
      cin >> b[2];
      cin >> x;
      cin >> b[3];
      cin >> b[4];
      cin >> x;
      cin >> b[5];
      cin >> b[6];
      char t = b[1];
      if (b[1] == t && b[2] == t && b[3] == t && b[4] == t && b[5] == t &&
          b[6] == t) {
        p[j].taxi++;
      } else if (b[1] > b[2] && b[2] > b[3] && b[3] > b[4] && b[4] > b[5] &&
                 b[5] > b[6] && b[6] < b[1]) {
        p[j].pizza++;
      } else {
        p[j].girl++;
      }
      memset(b, 0, sizeof(b));
    }
  }
  sort(p, p + m, cmt);
  int x = 0;
  for (int i = 0; i < m; i++) {
    if (p[i + 1].taxi < p[i].taxi) {
      break;
    }
    x++;
  }
  cout << "If you want to call a taxi, you should call: ";
  if (x == m) {
    x--;
  }
  for (int i = 0; i <= x; i++) {
    if (i == x)
      cout << p[i].name << "." << endl;
    else {
      cout << p[i].name << ", ";
    }
  }
  sort(p, p + m, cmp);
  x = 0;
  for (int i = 0; i < m; i++) {
    if (p[i + 1].pizza < p[i].pizza) {
      break;
    }
    x++;
  }
  if (x == m) {
    x--;
  }
  cout << "If you want to order a pizza, you should call: ";
  for (int i = 0; i <= x; i++) {
    if (i == x)
      cout << p[i].name << "." << endl;
    else {
      cout << p[i].name << ", ";
    }
  }
  sort(p, p + m, cmg);
  x = 0;
  for (int i = 0; i < m; i++) {
    if (p[i + 1].girl < p[i].girl) {
      break;
    }
    x++;
  }
  if (x == m) {
    x--;
  }
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (int i = 0; i <= x; i++) {
    if (i == x)
      cout << p[i].name << "." << endl;
    else {
      cout << p[i].name << ", ";
    }
  }
  return 0;
}
