#include <bits/stdc++.h>
using namespace std;
int opr(string s) {
  int l, k, ind, i;
  l = 0;
  k = 0;
  ind = 0;
  for (i = 1; i < s.length(); i++)
    if (s[i] != '-')
      if (s[i] != s[ind]) {
        l = -100500;
        break;
      } else
        ind = i;
  for (i = 1; i < s.length(); i++)
    if (s[i] != '-')
      if (s[i] >= s[ind]) {
        k = -100500;
        break;
      } else
        ind = i;
  if (l == 0)
    return (1);
  else if (k == 0)
    return (2);
  else
    return (0);
}
string s[111];
int a[111], b[111], c[111];
int main() {
  string ss;
  int n, pizza, taxi, girl, pi, gi, ta, i, j, m, indta, indpi, indgi, flag,
      inda, indb, indc;
  cin >> n;
  pizza = -1;
  girl = -1;
  taxi = -1;
  indpi = -1;
  indgi = -1;
  indta = -1;
  a[0] = -1;
  b[0] = -1;
  c[0] = -1;
  for (i = 1; i <= n; i++) {
    cin >> m >> s[i];
    pi = 0;
    gi = 0;
    ta = 0;
    for (j = 1; j <= m; j++) {
      cin >> ss;
      flag = opr(ss);
      if (flag == 1) ta++;
      if (flag == 2) pi++;
      if (flag == 0) gi++;
    }
    if (ta == taxi) {
      inda++;
      a[inda] = i;
    }
    if (pi == pizza) {
      indc++;
      c[indc] = i;
    }
    if (gi == girl) {
      indb++;
      b[indb] = i;
    }
    if (ta > taxi) {
      indta = i;
      taxi = ta;
      inda = 1;
      a[1] = i;
    }
    if (gi > girl) {
      indgi = i;
      girl = gi;
      indb = 1;
      b[1] = i;
    }
    if (pi > pizza) {
      indpi = i;
      pizza = pi;
      indc = 1;
      c[1] = i;
    }
  }
  cout << "If you want to call a taxi, you should call: ";
  for (i = 1; i <= inda; i++)
    if (i != inda)
      cout << s[a[i]] << ", ";
    else
      cout << s[a[i]] << "." << endl;
  cout << "If you want to order a pizza, you should call: ";
  for (i = 1; i <= indc; i++)
    if (i != indc)
      cout << s[c[i]] << ", ";
    else
      cout << s[c[i]] << "." << endl;
  cout
      << "If you want to go to a cafe with a wonderful girl, you should call: ";
  for (i = 1; i <= indb; i++)
    if (i != indb)
      cout << s[b[i]] << ", ";
    else
      cout << s[b[i]] << "." << endl;
  cin.get();
  cin.get();
}
