#include <bits/stdc++.h>
using namespace std;
bool secdes(const pair<long long, long long>& a,
            const pair<long long, long long>& b) {
  if (a.second == b.second) {
    return a.first > b.first;
  } else {
    return a.second > b.second;
  }
}
bool sir(const pair<long long, long long>& a,
         const pair<long long, long long>& b) {
  if (a.first == b.first) {
    return a.second > b.second;
  } else {
    return a.first > b.first;
  }
}
const long long no = 3e5 + 5;
long long a[no], b[no];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  long long kk = t;
  string taxi = "", pizza = "", girl = "";
  long long mtax = 0, mpiz = 0, mgir = 0, tax = 0, piz = 0, gir = 0;
  while (t--) {
    long long tax = 0, piz = 0, gir = 0;
    long long n;
    cin >> n;
    string s;
    cin >> s;
    while (n--) {
      string p;
      cin >> p;
      if (p[0] == p[1] && p[1] == p[3] && p[3] == p[4] && p[4] == p[6] &&
          p[6] == p[7])
        tax++;
      else if (p[0] > p[1] && p[1] > p[3] && p[3] > p[4] && p[4] > p[6] &&
               p[6] > p[7])
        piz++;
      else
        gir++;
    }
    if (mtax < tax) {
      taxi = "";
      taxi += s;
      mtax = tax;
    } else if (mtax == tax) {
      if (kk - 1 == t) {
        taxi = "";
      } else {
        taxi += ", ";
      }
      taxi += s;
    }
    if (mpiz < piz) {
      pizza = "";
      pizza += s;
      mpiz = piz;
    } else if (mpiz == piz) {
      if (kk - 1 == t) {
        pizza = "";
      } else {
        pizza += ", ";
      }
      pizza += s;
    }
    if (mgir < gir) {
      girl = "";
      girl += s;
      mgir = gir;
    } else if (mgir == gir) {
      if (kk - 1 == t) {
        girl = "";
      } else {
        girl += ", ";
      }
      girl += s;
    }
  }
  cout << "If you want to call a taxi, you should call: " << taxi << "."
       << "\n";
  cout << "If you want to order a pizza, you should call: " << pizza << "."
       << "\n";
  cout << "If you want to go to a cafe with a wonderful girl, you should call: "
       << girl << "."
       << "\n";
}
