#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
typedef struct Node {
  string name;
  int n, idx;
  int t, p, g;
} Node;
int n;
Node p[maxn];
int judge(string tmp) {
  if (tmp[0] == tmp[1] && tmp[1] == tmp[3] && tmp[3] == tmp[4] &&
      tmp[4] == tmp[6] && tmp[6] == tmp[7])
    return 1;
  if (tmp[0] > tmp[1] && tmp[1] > tmp[3] && tmp[3] > tmp[4] &&
      tmp[4] > tmp[6] && tmp[6] > tmp[7])
    return 2;
  return 3;
}
bool cmp1(Node a, Node b) {
  if (a.t == b.t) return a.idx < b.idx;
  return a.t > b.t;
}
bool cmp2(Node a, Node b) {
  if (a.p == b.p) return a.idx < b.idx;
  return a.p > b.p;
}
bool cmp3(Node a, Node b) {
  if (a.g == b.g) return a.idx < b.idx;
  return a.g > b.g;
}
int main() {
  string tmp;
  while (~scanf("%d", &n)) {
    int cur;
    for (int i = (1); i < (n + 1); i++) {
      cin >> p[i].n >> p[i].name;
      p[i].t = p[i].p = p[i].g = 0;
      p[i].idx = i;
      for (int j = 0; j < (p[i].n); j++) {
        cin >> tmp;
        int q = judge(tmp);
        if (q == 1)
          p[i].t++;
        else if (q == 2)
          p[i].p++;
        else if (q == 3)
          p[i].g++;
      }
    }
    sort(p + 1, p + n + 1, cmp1);
    printf("If you want to call a taxi, you should call: ");
    cout << p[1].name;
    cur = p[1].t;
    for (int i = (2); i < (n + 1); i++) {
      if (p[i].t == cur)
        cout << ", " << p[i].name;
      else
        break;
    }
    cout << "." << endl;
    sort(p + 1, p + n + 1, cmp2);
    printf("If you want to order a pizza, you should call: ");
    cout << p[1].name;
    cur = p[1].p;
    for (int i = (2); i < (n + 1); i++) {
      if (p[i].p == cur)
        cout << ", " << p[i].name;
      else
        break;
    }
    cout << "." << endl;
    sort(p + 1, p + n + 1, cmp3);
    printf(
        "If you want to go to a cafe with a wonderful girl, you should call: ");
    cout << p[1].name;
    cur = p[1].g;
    for (int i = (2); i < (n + 1); i++) {
      if (p[i].g == cur)
        cout << ", " << p[i].name;
      else
        break;
    }
    cout << "." << endl;
  }
  return 0;
}
